daff.Alignment
Store the relationship between tables. Answers the question: where does a row/column of table A appear in table B?
Type: class
Constructor:
new()
Variables:
comp : TableComparisonState
has_addition : Bool
has_removal : Bool
reference : Alignment
Methods:
a2b (a : Int) : Null<Int>
Returns: given a row/column number in table A, this returns the row/column number in table B (or null if not in that table)
addIndexColumns (unit : Unit) : Void
Record a column as being important for identifying rows.
This is important for making sure it gets preserved in
diffs, for example.
Parameters:
unit
the column’s location in table A (l/left) and in table B (r/right).
addToOrder (l : Int, r : Int, ?p : Int) : Void
Manually set an ordered version of the alignment.
Parameters:
l
row/column number in local tabler
row/column number in remote tablep
row/column number in parent table (if there is one)
b2a (b : Int) : Null<Int>
Returns: given a row/column number in table B, this returns the row/column number in table A (or null if not in that table)
count () : Int
Returns: a count of how many row/columns have been linked
getIndexColumns () : Array<Unit>
Returns: a list of columns important for identifying rows
getSource () : Table
Returns: table A
getSourceHeader () : Int
Get the header row for table A, if present.
Returns: header row for table A, or -1 if not present or not applicable
getTarget () : Table
Returns: table B
getTargetHeader () : Int
Get the header row for table B, if present.
Returns: header row for table B, or -1 if not present or not applicable
headers (ia : Int, ib : Int) : Void
Mark the header rows of tables A and B, if present.
Not applicable for column alignments.
Parameters:
ia
index of the header row of table Aia
index of the header row of table B
isMarkedAsIdentical () : Bool
link (a : Int, b : Int) : Void
Declare the specified rows/columns to be the "same" row/column
in the two tables.
Parameters:
a
row/column in table Ab
row/column in table B
markIdentical () : Void
range (ha : Int, hb : Int) : Void
Record the heights of tables A and B.
setRowlike (flag : Bool) : Void
Set whether we are aligning rows or columns.
Parameters:
flag
true when aligning rows, false when aligning columns
tables (ta : Table, tb : Table) : Void
Keep references to tables A and B. The `Alignment` class never
looks at these tables itself, these references are stored only
for the convenience of users of the alignment.
toOrder () : Ordering
Returns: an ordered version of the alignment, as a merged list of rows/columns
toString () : String
Returns: text representation of alignment