public class RelationalLocator extends AttributeLocator
Attribute.RELATIONAL
,
Serialized FormConstructor and Description |
---|
RelationalLocator(Instances data)
Initializes the RelationalLocator with the given data.
|
RelationalLocator(Instances data,
int[] indices)
Initializes the RelationalLocator with the given data.
|
RelationalLocator(Instances data,
int fromIndex,
int toIndex)
Initializes the RelationalLocator with the given data.
|
Modifier and Type | Method and Description |
---|---|
static void |
copyRelationalValues(Instance instance,
boolean instSrcCompat,
Instances srcDataset,
AttributeLocator srcLoc,
Instances destDataset,
AttributeLocator destLoc)
Takes relational values referenced by an Instance and copies them from a
source dataset to a destination dataset.
|
static void |
copyRelationalValues(Instance inst,
Instances destDataset,
AttributeLocator strAtts)
Copies relational values contained in the instance copied to a new dataset.
|
java.lang.String |
getRevision()
Returns the revision string.
|
compareTo, equals, getActualIndex, getAllowedIndices, getAttributeIndices, getData, getLocator, getLocatorIndices, getType, toString
public RelationalLocator(Instances data)
data
- the data to work onpublic RelationalLocator(Instances data, int fromIndex, int toIndex)
data
- the data to work onfromIndex
- the first index to inspect (including)toIndex
- the last index to check (including)public RelationalLocator(Instances data, int[] indices)
data
- the data to work onindices
- the attribute indices to checkpublic static void copyRelationalValues(Instance inst, Instances destDataset, AttributeLocator strAtts)
inst
- the Instance containing the relational values to copy.destDataset
- the destination set of InstancesstrAtts
- an AttributeLocator containing the indices of any relational
attributes in the dataset.public static void copyRelationalValues(Instance instance, boolean instSrcCompat, Instances srcDataset, AttributeLocator srcLoc, Instances destDataset, AttributeLocator destLoc)
instance
- the instance containing references to relations in the
source dataset that will have references updated to be valid for
the destination dataset.instSrcCompat
- true if the instance structure is the same as the
source, or false if it is the same as the destination (i.e. which
of the relational attribute indices contains the correct locations
for this instance).srcDataset
- the dataset for which the current instance relationvalue
references are valid (after any position mapping if needed)srcLoc
- an AttributeLocator containing the indices of relational
attributes in the source datset.destDataset
- the dataset for which the current instance relation
references need to be inserted (after any position mapping if
needed)destLoc
- an AttributeLocator containing the indices of relational
attributes in the destination datset.public java.lang.String getRevision()
getRevision
in interface RevisionHandler
getRevision
in class AttributeLocator