|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcalhoun.analysis.crf.io.InputSequenceComposite
public class InputSequenceComposite
a composite input sequence made up of individual components. This is useful when putting together different features that may take different inputs. Each component is given a name within the overall composite and can be reference by that name. All sequences must have the same length. The value at any position in the sequence is a map that relates component names to their values at that position.
| Constructor Summary | |
|---|---|
InputSequenceComposite()
default constructor. |
|
InputSequenceComposite(java.util.Map<java.lang.String,InputSequence<?>> data)
constructor that initializes the sequence with a set of components. |
|
| Method Summary | |
|---|---|
void |
addComponent(java.lang.String name,
InputSequence<?> seq)
adds a new component input sequence to this composite. |
void |
addComponents(java.util.Map<java.lang.String,InputSequence<?>> data)
adds all input sequences in the given map as components. |
InputSequence<?> |
getComponent(java.lang.String name)
For input sequences that are a composite of several different input objects, returns a particular component of the input. |
java.util.Map<java.lang.String,InputSequence<?>> |
getComponents()
returns all of components of this input sequence. |
java.util.Map<java.lang.String,java.lang.Object> |
getX(int ix)
retrieves the input value at a position in the input sequence. |
int |
length()
Returns the length of this sequence |
java.util.Collection<java.lang.String> |
listComponents()
For input sequences that are a composite of several different input objects, returns a list of the names of the components in this input sequence. |
InputSequenceComposite |
subSequence(int start,
int end)
tTakes a subinterval of the input sequence with given start-end coordinates which are relative coordinates, 1-based, and inclusive. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public InputSequenceComposite()
public InputSequenceComposite(java.util.Map<java.lang.String,InputSequence<?>> data)
data - the initial input sequences to use as the components| Method Detail |
|---|
public void addComponent(java.lang.String name,
InputSequence<?> seq)
public void addComponents(java.util.Map<java.lang.String,InputSequence<?>> data)
public java.util.Map<java.lang.String,InputSequence<?>> getComponents()
public java.util.Map<java.lang.String,java.lang.Object> getX(int ix)
InputSequence
getX in interface InputSequence<java.util.Map<java.lang.String,java.lang.Object>>ix - the index position at which to get the input. This is a zero-based index.
public int length()
InputSequence
length in interface InputSequence<java.util.Map<java.lang.String,java.lang.Object>>public InputSequence<?> getComponent(java.lang.String name)
InputSequenceUnsupportedOperationException.
getComponent in interface InputSequence<java.util.Map<java.lang.String,java.lang.Object>>name - the name of the input component to return
public java.util.Collection<java.lang.String> listComponents()
InputSequence
listComponents in interface InputSequence<java.util.Map<java.lang.String,java.lang.Object>>
public InputSequenceComposite subSequence(int start,
int end)
InputSequence
An implementation that does not support subsetting should throw an UnsupportedOperationException
subSequence in interface InputSequence<java.util.Map<java.lang.String,java.lang.Object>>start - the 1-based index of the first position of the input to retrieve.end - the 1-based index of the last position of the input to retrieve.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||