public class CogxelMatrixConverter extends java.lang.Object implements CogxelConverter<Matrix>
Constructor and Description |
---|
CogxelMatrixConverter(java.util.ArrayList<CogxelVectorConverter> columnConverters)
Creates a new instance of CogxelMatrixConverter
|
CogxelMatrixConverter(java.util.ArrayList<CogxelVectorConverter> columnConverters,
SemanticIdentifierMap semanticIdentifierMap)
Creates a new instance of CogxelMatrixConverter
|
CogxelMatrixConverter(CogxelMatrixConverter other)
Copy constructor
|
CogxelMatrixConverter(java.util.Collection<? extends java.lang.Iterable<SemanticLabel>> columns)
Creates a new instance of CogxelMatrixConverter
|
Modifier and Type | Method and Description |
---|---|
CogxelMatrixConverter |
clone()
Creates a new clone (shallow copy) of this object.
|
Matrix |
fromCogxels(CogxelState cogxels)
Converts from a CogxelState object to an object of type DataType.
|
java.util.ArrayList<CogxelVectorConverter> |
getColumnConverters()
Getter for columnConverters
|
SemanticIdentifierMap |
getSemanticIdentifierMap()
Gets the SemanticIdentifierMap used by this converter.
|
protected void |
setColumnConverters(java.util.ArrayList<CogxelVectorConverter> columnConverters)
Setter for columnConverters
|
void |
setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
Sets the SemanticIdentifierMap that the converter is to use.
|
void |
toCogxels(Matrix data,
CogxelState cogxels)
Converts from an object of type DataType to an updated CogxelState.
|
public CogxelMatrixConverter(java.util.Collection<? extends java.lang.Iterable<SemanticLabel>> columns)
columns
- Iterable of SemanticLabels to create CogxelVectorConverters frompublic CogxelMatrixConverter(java.util.ArrayList<CogxelVectorConverter> columnConverters)
columnConverters
- Collection CogxelVectorConverters that convert the columns of the matrixpublic CogxelMatrixConverter(java.util.ArrayList<CogxelVectorConverter> columnConverters, SemanticIdentifierMap semanticIdentifierMap)
columnConverters
- Collection CogxelVectorConverters that convert the columns of the matrixsemanticIdentifierMap
- SemanticIdentifierMap for the converterpublic CogxelMatrixConverter(CogxelMatrixConverter other)
other
- CogxelMatrixConverter to clonepublic CogxelMatrixConverter clone()
clone
in interface CogxelConverter<Matrix>
clone
in interface CloneableSerializable
clone
in class java.lang.Object
public SemanticIdentifierMap getSemanticIdentifierMap()
getSemanticIdentifierMap
in interface CogxelConverter<Matrix>
public void setSemanticIdentifierMap(SemanticIdentifierMap semanticIdentifierMap)
setSemanticIdentifierMap
in interface CogxelConverter<Matrix>
semanticIdentifierMap
- The SemanticIdentifierMap the converter is
to use.public Matrix fromCogxels(CogxelState cogxels)
fromCogxels
in interface CogxelConverter<Matrix>
cogxels
- The CogxelState to convert to DataType.public void toCogxels(Matrix data, CogxelState cogxels)
toCogxels
in interface CogxelConverter<Matrix>
data
- The object to convert into the CogxelState.cogxels
- The CogxelState to update with the converted data.public java.util.ArrayList<CogxelVectorConverter> getColumnConverters()
protected void setColumnConverters(java.util.ArrayList<CogxelVectorConverter> columnConverters)
columnConverters
- Collection CogxelVectorConverters that convert the columns of the matrix