Constructor
new WeightedAdjacencyMatrix(divID, matrixConfiguration)
Creates a color coded adjacency matrix contained in a WeightedAdjMat object.
Parameters:
Name | Type | Description |
---|---|---|
divID |
string | the id of the div that contains the graph, e.g "#id". |
matrixConfiguration |
object | The configurations of the adjacency matrix. It can be obtained via Config.getAdjacencyMatrixConfig(). |
- Source:
Methods
createMatrix(rowLab, colLab)
Creates an adjacency matrix based on the row and column labels.
Parameters:
Name | Type | Description |
---|---|---|
rowLab |
array | An array of labels that represent the row of the matrix. |
colLab |
array | An array of labels that represent the column of the matrix. |
- Source:
createMatrix(rowLab, colLab)
Creates an adjacency matrix based on the row and column labels.
Parameters:
Name | Type | Description |
---|---|---|
rowLab |
array | An array of labels that represent the row of the matrix. |
colLab |
array | An array of labels that represent the column of the matrix. |
- Source:
getCellWeight(cell) → {Integer}
Get the matix cell weight by cell pair, e.g. (i, j).
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array | the cell to increase weight is represented by a coordinate pair, ie. cell = (i, j). |
- Source:
Returns:
The cell weight.
- Type
- Integer
getCellWeight(cell) → {Integer}
Get the matix cell weight by cell pair, e.g. (i, j).
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array | the cell to increase weight is represented by a coordinate pair, ie. cell = (i, j). |
- Source:
Returns:
The cell weight.
- Type
- Integer
getMatrix1D() → {Integer}
Get the matrix cell data as a 1D array.
- Source:
Returns:
The matrix data as a 1D array.
- Type
- Integer
getMatrix1D() → {Integer}
Get the matrix cell data as a 1D array.
- Source:
Returns:
The matrix data as a 1D array.
- Type
- Integer
increaseCellColor(cell, weight)
Increases the matix cell color weight and darkens the color by label pair.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array | The cell to increase weight is represented by a coordinate pair using labels, ie. cell = (rowLabel, colLabel). |
weight |
Integer | Used to increase the color weight of the cell. |
- Source:
increaseCellColor(cell, weight)
Increases the matix cell color weight and darkens the color by label pair.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array | The cell to increase weight is represented by a coordinate pair using labels, ie. cell = (rowLabel, colLabel). |
weight |
Integer | Used to increase the color weight of the cell. |
- Source:
increaseCellWeight(cell, weight)
Increases the matix cell weight by label pair.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array | The cell to increase weight is represented by a coordinate pair using labels, ie. cell = (rowLabel, colLabel). |
weight |
Integer | Used to increase the weight of the cell. |
- Source:
increaseCellWeight(cell, weight)
Increases the matix cell weight by label pair.
Parameters:
Name | Type | Description |
---|---|---|
cell |
Array | The cell to increase weight is represented by a coordinate pair using labels, ie. cell = (rowLabel, colLabel). |
weight |
Integer | Used to increase the weight of the cell. |
- Source:
increaseColumnColor(colLabel, weight)
Increases the matix column color weight and darkens the color.
Parameters:
Name | Type | Description |
---|---|---|
colLabel |
Array | The label of the column to increase weight is represented by a label in string. |
weight |
Integer | Used to increase the color weight of the cell. |
- Source:
increaseColumnColor(colLabel, weight)
Increases the matix column color weight and darkens the color.
Parameters:
Name | Type | Description |
---|---|---|
colLabel |
Array | The label of the column to increase weight is represented by a label in string. |
weight |
Integer | Used to increase the color weight of the cell. |
- Source:
redrawMatrix()
Draws the adjancy matrix based on the property of each cell.
- Source:
redrawMatrix()
Draws the adjancy matrix based on the property of each cell.
- Source: