/* Flatbuffers schema for use in cellxgene wire-format. Schema defines a general purpose, polymorphic, 2D matrix. Data is organized in a columnar layout. Each column is homomorphic, and several column types are supported: - IEEE 32 and 64 bit floats - signed and unsigned 32 bit integers - JSON/UTF8 encoded array (for other types) https://github.com/google/flatbuffers http://google.github.io/flatbuffers/ NOTE: IF YOU MODIFY THIS FILE, YOU MUST RECOMPILE AND COMMIT RESULTING FILES TO THE REPO: * server/app/util/fbs/NetEncoding/* * client/src/util/stateManager/matrix_generated.js */ namespace NetEncoding; table Float32Array { data: [float32]; } table Uint32Array { data: [uint32]; } table Int32Array { data: [int32]; } table Float64Array { data: [float64]; } table JSONEncodedArray { // contains a UTF-8/JSON encoded array. Used to store other // types (or polymorphic arrays) data: [uint8]; } union TypedArray { Float32Array, Int32Array, Uint32Array, Float64Array, JSONEncodedArray } // Extra level of indirection required because vector of union not yet supported table Column { u: TypedArray; } // 2D matrix stored in columnar layout // table Matrix { n_rows: uint32; // all columns have this length n_cols: uint32; // same as columns.length columns: [Column]; // length n_cols // optional row and column index, with same length as corresponding dimension. // If null, defaults to numeric index, ie, [0, n_rows) or [0, n_cols) col_index: TypedArray; row_index: TypedArray; } root_type Matrix;