SparseMatrix Class

Packages > fluid-framework > SparseMatrix

Deprecated

SparseMatrix is an abandoned prototype. Use SharedMatrix instead.

Signature:

export declare class SparseMatrix extends SharedSegmentSequence<MatrixSegment> 

Extends: SharedSegmentSequenceMatrixSegment

Constructors

List of constructors for this class
Constructor Modifiers Description
(constructor)(document, id, attributes) Constructs a new instance of the SparseMatrix class

Properties

List of properties for this class
Property Modifiers Type Description
id
numRows

Methods

List of methods on this class
Method Modifiers Description
annotatePosition(row, col, props)
create(runtime, id) static Create a new sparse matrix
getFactory() static Get a factory for SharedMap to register with the data store.
getItem(row, col)
getPositionProperties(row, col)
getTag(row, col)
insertCols(col, numCols)
insertRows(row, numRows)
removeCols(col, numCols)
removeRows(row, numRows)
setItems(row, col, values, props)
setTag(row, col, tag)

Constructors

SparseMatrix.(constructor)

Constructs a new instance of the SparseMatrix class

Signature:

constructor(document: IFluidDataStoreRuntime, id: string, attributes: IChannelAttributes);

Parameters

List of parameters
Parameter Type Description
document
id
attributes

Properties

id

Signature:

id: string;

numRows

Signature:

get numRows(): number;

Methods

annotatePosition

Signature:

annotatePosition(row: number, col: number, props: PropertySet): void;

Parameters

List of parameters
Parameter Type Description
row
col
props

Returns:

create

Create a new sparse matrix

Signature:

static create(runtime: IFluidDataStoreRuntime, id?: string): SparseMatrix;

Parameters

List of parameters
Parameter Type Description
runtime data store runtime the new sparse matrix belongs to
id optional name of the sparse matrix

Returns:

SparseMatrix

newly create sparse matrix (but not attached yet)

getFactory

Get a factory for SharedMap to register with the data store.

Signature:

static getFactory(): IChannelFactory;

Returns:

a factory that creates and load SharedMap

getItem

Signature:

getItem(row: number, col: number): Jsonable<string | number | boolean | IFluidHandle>;

Parameters

List of parameters
Parameter Type Description
row
col

Returns:

getPositionProperties

Signature:

getPositionProperties(row: number, col: number): PropertySet;

Parameters

List of parameters
Parameter Type Description
row
col

Returns:

getTag

Signature:

getTag(row: number, col: number): any;

Parameters

List of parameters
Parameter Type Description
row
col

Returns:

insertCols

Signature:

insertCols(col: number, numCols: number): void;

Parameters

List of parameters
Parameter Type Description
col
numCols

Returns:

insertRows

Signature:

insertRows(row: number, numRows: number): void;

Parameters

List of parameters
Parameter Type Description
row
numRows

Returns:

removeCols

Signature:

removeCols(col: number, numCols: number): void;

Parameters

List of parameters
Parameter Type Description
col
numCols

Returns:

removeRows

Signature:

removeRows(row: number, numRows: number): void;

Parameters

List of parameters
Parameter Type Description
row
numRows

Returns:

setItems

Signature:

setItems(row: number, col: number, values: SparseMatrixItem[], props?: PropertySet): void;

Parameters

List of parameters
Parameter Type Description
row
col
values SparseMatrixItem
props

Returns:

setTag

Signature:

setTag(row: number, col: number, tag: any): void;

Parameters

List of parameters
Parameter Type Description
row
col
tag

Returns: