|
||||||||||
| 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>
gov.sandia.cognition.data.convert.vector.NumberConverterToVectorAdapter<InputType>
InputType - The input type to convert encode into a number, which is then adapted
to be used in a Vector.public class NumberConverterToVectorAdapter<InputType>
Adapts a DataConverter that outputs a number to be a
VectorEncoder.
| Field Summary | |
|---|---|
protected DataConverter<? super InputType,? extends Number> |
converter
The converter to adapt for use with Vectors. |
| Fields inherited from class gov.sandia.cognition.data.convert.vector.AbstractToVectorEncoder |
|---|
vectorFactory |
| Constructor Summary | |
|---|---|
NumberConverterToVectorAdapter()
Creates a new NumberConverterToVectorAdapter. |
|
NumberConverterToVectorAdapter(DataConverter<? super InputType,? extends Number> converter)
Creates a new NumberConverterToVectorAdapter for the given
converter. |
|
| Method Summary | |
|---|---|
void |
encode(InputType object,
Vector vector,
int index)
Encodes the given object into the vector at the given index by using the number converter that this object is adapting. |
DataConverter<? super InputType,? extends Number> |
getConverter()
Gets the number converter being adapted to work with vectors. |
int |
getOutputDimensionality()
Gets the dimensionality of this encoder, which is 1. |
void |
setConverter(DataConverter<? super InputType,? extends Number> converter)
Sets the number converter being adapted to work with vectors. |
| Methods inherited from class gov.sandia.cognition.data.convert.vector.AbstractToVectorEncoder |
|---|
encode, evaluate |
| 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 |
| Field Detail |
|---|
protected DataConverter<? super InputType,? extends Number> converter
Vectors.
| Constructor Detail |
|---|
public NumberConverterToVectorAdapter()
NumberConverterToVectorAdapter.
public NumberConverterToVectorAdapter(DataConverter<? super InputType,? extends Number> converter)
NumberConverterToVectorAdapter for the given
converter.
converter - The converter to adapt.| Method Detail |
|---|
public void encode(InputType object,
Vector vector,
int index)
object - The input object to encode.vector - The vector to encode into.index - The index to encode at.public int getOutputDimensionality()
public DataConverter<? super InputType,? extends Number> getConverter()
public void setConverter(DataConverter<? super InputType,? extends Number> converter)
converter - The adapted converter.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||