|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectgov.sandia.cognition.util.AbstractCloneableSerializable
gov.sandia.cognition.data.convert.AbstractDataConverter<InputType,Vector>
gov.sandia.cognition.data.convert.vector.AbstractToVectorEncoder<InputType>
InputType - The type of input data to be encoded into a Vector.public abstract class AbstractToVectorEncoder<InputType>
An abstract implementation of the DataToVectorEncoder interface. It
chains together the typical calls to create a vector and allows a vector
factory to be stored on the encoder.
| Field Summary | |
|---|---|
protected VectorFactory<?> |
vectorFactory
The vector factory to use to create new vectors. |
| Constructor Summary | |
|---|---|
AbstractToVectorEncoder()
Creates a new AbstractToVectorEncoder. |
|
AbstractToVectorEncoder(VectorFactory<?> vectorFactory)
Creates a new AbstractToVectorEncoder with the given vector
factory. |
|
| Method Summary | |
|---|---|
void |
encode(InputType object,
Vector vector)
Encodes the given object into the given Vector. |
Vector |
evaluate(InputType input)
Converts the given object to a Vector. |
| Methods inherited from class gov.sandia.cognition.util.AbstractCloneableSerializable |
|---|
clone |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface gov.sandia.cognition.data.convert.vector.DataToVectorEncoder |
|---|
encode, getOutputDimensionality |
| Field Detail |
|---|
protected VectorFactory<?> vectorFactory
| Constructor Detail |
|---|
public AbstractToVectorEncoder()
AbstractToVectorEncoder.
public AbstractToVectorEncoder(VectorFactory<?> vectorFactory)
AbstractToVectorEncoder with the given vector
factory.
vectorFactory - The VectorFactory to use.| Method Detail |
|---|
public Vector evaluate(InputType input)
Vector.
evaluate in interface Evaluator<InputType,Vector>input - The object to convert.
Vector representing the object.
public void encode(InputType object,
Vector vector)
DataToVectorEncoderVector. It starts at
index zero in the Vector.
encode in interface DataToVectorEncoder<InputType>object - The object to encode.vector - The vector to encode the object into.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||