public class ParameterAssumptionEncoder extends Object
orderedParameterInstances
and
encoding
are necessary: the first item
gives the order in which the assumptions allocated to the parameter instances
are given, the second defines which index belongs to which assumption. For
example, the encoded assumption sequence
[0 2 3]
can be used to read out a specific allocation as follows:
1. The parameter instance in question is the last item in
orderedParameterInstances
, so the selected
assumption here is '3'
2. For this parameter instance, the index '3' refers to a specific parameter
assignment.
This mapping is summarised in both human- and machine-readable form.
The order of the instances is defined by ParameterInstanceComparator
.
The order of assignments is defined by their IDs.ParameterAssignment
,
ParameterInstance
,
ParameterInstanceComparator
Constructor and Description |
---|
ParameterAssumptionEncoder(ProjectionModel projectionModel)
Instantiates a new parameter assumption encoder.
|
Modifier and Type | Method and Description |
---|---|
int[] |
encode(Map<ParameterInstance,ParameterAssignment> assignment)
Encode a given instance -> assignment mapping to array.
|
String |
verboseEncoding(Map<ParameterInstance,ParameterAssignment> assignment)
Returns a verbose encoding of a given assignment.
|
void |
writeMappingSummary(File dataDirectory)
Writes a mapping summary.
|
public ParameterAssumptionEncoder(ProjectionModel projectionModel)
projectionModel
- the projection modelpublic void writeMappingSummary(File dataDirectory) throws IOException
encoding
, ordered by
orderedParameterInstances
.dataDirectory
- the data directoryIOException
- Signals that an I/O exception has occurred.public int[] encode(Map<ParameterInstance,ParameterAssignment> assignment)
assignment
- the assignment mappingpublic String verboseEncoding(Map<ParameterInstance,ParameterAssignment> assignment)
assignment
- the assignmentCopyright © 2013. All Rights Reserved.