at.jku.risc.stout.urauc.data
public class Alignment extends TinyList<Alignment.AlignmentAtom>
Modifier and Type | Class and Description |
---|---|
static class |
Alignment.AlignmentAtom
An Alignment.AlignmentAtom consists of two TermAtoms.
|
Constructor and Description |
---|
Alignment()
Creates an alignment with initial capacity 16.
|
Alignment(int capacity)
Creates an alignment with the given initial capacity.
|
Modifier and Type | Method and Description |
---|---|
void |
addAllRootIdx(int addLeft,
int addRight) |
void |
addAtom(Alignment.AlignmentAtom atom)
Adds a new Alignment.AlignmentAtom to this Alignment.
|
Alignment |
clone() |
void |
incAllRootIdxLeft() |
void |
incAllRootIdxRight() |
boolean |
isAdmissible()
Tests whether the alignment is admissible or not.
|
void |
reset()
Resets the alignment to the initial state.
|
boolean |
setAtomIfTailAdmissible(int idx,
Alignment.AlignmentAtom atom)
Sets the Alignment.AlignmentAtom at the given (relative) position if
the atom is admissible with the elements behind it (the elements with
higher index).
|
void |
setSize(int size)
Sets the relative size and increases the capacity if necessary.
|
String |
toString() |
get, getFirst, getLast, isEmpty, removeFirst, removeLast, size, subList, subList
public Alignment()
public Alignment(int capacity)
public void addAllRootIdx(int addLeft, int addRight)
public void addAtom(Alignment.AlignmentAtom atom)
public void incAllRootIdxLeft()
public void incAllRootIdxRight()
public boolean isAdmissible()
public void reset()
public boolean setAtomIfTailAdmissible(int idx, Alignment.AlignmentAtom atom)
public void setSize(int size)
public String toString()
toString
in class TinyList<Alignment.AlignmentAtom>