Class MultidimensionalAttribute<O>
- java.lang.Object
-
- ai.libs.jaicore.ml.core.dataset.schema.attribute.AAttribute
-
- ai.libs.jaicore.ml.core.dataset.schema.attribute.AGenericObjectAttribute<O>
-
- ai.libs.jaicore.ml.core.dataset.schema.attribute.MultidimensionalAttribute<O>
-
- Type Parameters:
O- O is the type of theMultidimensionalAttributeValuethat is parsed using thisIAttribute. This should be a double array of dimension 2 or 3.
- All Implemented Interfaces:
java.io.Serializable,org.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute,org.api4.java.ai.ml.core.dataset.schema.attribute.INumericEncodingAttribute,org.api4.java.ai.ml.core.dataset.schema.attribute.IObjectAttribute<NumericAttribute>
- Direct Known Subclasses:
ThreeDimensionalAttribute,TwoDimensionalAttribute
public abstract class MultidimensionalAttribute<O> extends AGenericObjectAttribute<O> implements org.api4.java.ai.ml.core.dataset.schema.attribute.IObjectAttribute<NumericAttribute>
This is anIAttributeclass that holds Multidimensional Double Arrays.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringARRAY_STRING_SPLITTERprotected static java.lang.StringEMPTY_STRINGprotected static java.lang.StringINNTER_ARRAY_SPLITTERprotected static java.lang.StringOPEN_OR_CLOSED_BRACES_REGEXprotected static java.lang.StringSINGLE_SPACEprotected static java.lang.StringWHITESPACE_REGEX
-
Constructor Summary
Constructors Modifier Constructor Description protectedMultidimensionalAttribute(java.lang.String name)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description OdeserializeAttributeValue(java.lang.String string)protected abstract OformGenericMultidimensionalArray(java.lang.String[] values)protected OgetValueAsTypeInstance(java.lang.Object object)java.lang.StringserializeAttributeValue(java.lang.Object value)This method takes and parameter of typeMultidimensionalAttributeValueor O and serializes it.doubletoDouble(java.lang.Object object)-
Methods inherited from class ai.libs.jaicore.ml.core.dataset.schema.attribute.AGenericObjectAttribute
decodeValue, encodeValue, equals, getAsAttributeValue, hashCode
-
Methods inherited from class ai.libs.jaicore.ml.core.dataset.schema.attribute.AAttribute
getName
-
-
-
-
Field Detail
-
SINGLE_SPACE
protected static final java.lang.String SINGLE_SPACE
- See Also:
- Constant Field Values
-
ARRAY_STRING_SPLITTER
protected static final java.lang.String ARRAY_STRING_SPLITTER
- See Also:
- Constant Field Values
-
EMPTY_STRING
protected static final java.lang.String EMPTY_STRING
- See Also:
- Constant Field Values
-
OPEN_OR_CLOSED_BRACES_REGEX
protected static final java.lang.String OPEN_OR_CLOSED_BRACES_REGEX
- See Also:
- Constant Field Values
-
INNTER_ARRAY_SPLITTER
protected static final java.lang.String INNTER_ARRAY_SPLITTER
- See Also:
- Constant Field Values
-
WHITESPACE_REGEX
protected static final java.lang.String WHITESPACE_REGEX
- See Also:
- Constant Field Values
-
-
Method Detail
-
toDouble
public double toDouble(java.lang.Object object)
- Specified by:
toDoublein interfaceorg.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute
-
serializeAttributeValue
public java.lang.String serializeAttributeValue(java.lang.Object value)
This method takes and parameter of typeMultidimensionalAttributeValueor O and serializes it. The resulting form should look like [[a b] [c d] ... [e f]].- Specified by:
serializeAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute
-
formGenericMultidimensionalArray
protected abstract O formGenericMultidimensionalArray(java.lang.String[] values)
-
deserializeAttributeValue
public O deserializeAttributeValue(java.lang.String string)
- Specified by:
deserializeAttributeValuein interfaceorg.api4.java.ai.ml.core.dataset.schema.attribute.IAttribute
-
getValueAsTypeInstance
protected O getValueAsTypeInstance(java.lang.Object object)
- Specified by:
getValueAsTypeInstancein classAGenericObjectAttribute<O>
-
-