Package ca.phon.alignment
Class AlignmentMap<T>
java.lang.Object
ca.phon.alignment.AlignmentMap<T>
- Direct Known Subclasses:
PhoneMap
,SyllableMap
Represents alignments between two arrays of similar objects.
-
Field Summary
Modifier and TypeFieldDescriptionprotected Integer[]
The 'bottom' alignment valuesprotected T[]
The 'bottom' list of elements to alignstatic final int
The value for an indelstatic final int
The value for a spacerprotected Integer[]
The 'top' alignment valuesprotected T[]
The 'top' list of elements to align -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetAligned
(Iterable<T> iterable) Return the list of object that are aligned with the given iterable list of object.getAligned
(List<T> eles) Return the list of objects that are aligned with the given list of objects.getAligned
(T[] eles) getAlignedElement
(T ele) Get the element aligned with the given element.getAlignedElements
(int alignmentIndex) Returns the set of aligned elements at the given alignment position.int
Returns the length of the alignment.Integer[]
Get the value of the bottom alignmentGet the bottom alignment as an array of elementsT[]
Get the bottom elementsInteger[]
Get the top alignmentGet the top alignment as an array of elementsT[]
Get the top elementsvoid
setBottomAlignment
(Integer[] bottomAlignment) Set the bottom alignmentvoid
setBottomElements
(T[] bottomElements) Set the bottom elementsvoid
setTopAlignment
(Integer[] topAlignment) Set the top alignmentvoid
setTopElements
(T[] topElements) Set the top elements
-
Field Details
-
INDEL_VALUE
public static final int INDEL_VALUEThe value for an indel- See Also:
-
SPACER_VALUE
public static final int SPACER_VALUEThe value for a spacer- See Also:
-
topElements
The 'top' list of elements to align -
bottomElements
The 'bottom' list of elements to align -
topAlignment
The 'top' alignment values -
bottomAlignment
The 'bottom' alignment values
-
-
Constructor Details
-
AlignmentMap
public AlignmentMap()Constructor
-
-
Method Details
-
getBottomAlignment
Get the value of the bottom alignment -
setBottomAlignment
Set the bottom alignment -
getBottomElements
Get the bottom elements -
setBottomElements
Set the bottom elements -
getTopAlignment
Get the top alignment -
setTopAlignment
Set the top alignment -
getTopElements
Get the top elements -
setTopElements
Set the top elements -
getAligned
-
getAligned
Return the list of object that are aligned with the given iterable list of object.- Parameters:
eles
-- Returns:
- aligned lements
-
getAligned
Return the list of objects that are aligned with the given list of objects. This method does not returnnull
values for indel/spacers.- Parameters:
eles
-- Returns:
- aligned elements
-
getAlignedElement
Get the element aligned with the given element.- Parameters:
ele
-- Returns:
- element (if present)
-
getTopAlignmentElements
Get the top alignment as an array of elements -
getBottomAlignmentElements
Get the bottom alignment as an array of elements -
getAlignmentLength
public int getAlignmentLength()Returns the length of the alignment.- Returns:
- int
-
getAlignedElements
Returns the set of aligned elements at the given alignment position.- Parameters:
alignmentIndex
-- Returns:
- T[0] the top alignment element, T[1] the bottom alignment element
-