|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectFormattableObject
AbstractIdentifiedObject
AbstractParameterDescriptor
DefaultParameterDescriptorGroup
MatrixParameterDescriptors
@Immutable public class MatrixParameterDescriptors
A parameter group for matrix elements. The amount of
parameter values is extensible, i.e. it can
grown or shrink according the value of "num_row" and "num_col"
parameters. The parameters format may vary according the information provided to
the constructor, but it is typically as below:
num_row num_col elt_0_0 elt_0_1 ... elt_0_<num_col-1> elt_1_0 elt_1_1 ... elt_<num_row-1>_<num_col-1>
MatrixParameters,
Serialized Form
| referencing/geotk-referencing (download) | View source code for this class |
| Field Summary | |
|---|---|
static int |
DEFAULT_MATRIX_SIZE
The default matrix size for the one-argument constructor. |
protected ParameterDescriptor<Integer> |
numCol
The descriptor for the "num_col" parameter. |
protected ParameterDescriptor<Integer> |
numRow
The descriptor for the "num_row" parameter. |
protected String |
prefix
The prefix to insert in front of parameter name for each matrix elements. |
protected char |
separator
The separator between the row and the column index in parameter names. |
| Fields inherited from class AbstractIdentifiedObject |
|---|
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATOR |
| Fields inherited from class FormattableObject |
|---|
EPSG, GEOTIFF, INTERNAL, OGC, SINGLE_LINE |
| Fields inherited from interface IdentifiedObject |
|---|
ALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY |
| Constructor Summary | |
|---|---|
MatrixParameterDescriptors(Map<String,?> properties)
Constructs a parameter group with default name format matching Well Known Text usages. |
|
MatrixParameterDescriptors(Map<String,?> properties,
ParameterDescriptor<?>[] parameters,
String prefix,
char separator)
Constructs a parameter group. |
|
| Method Summary | |
|---|---|
protected int |
computeHashCode()
Computes a hash value for this identified object. |
ParameterValueGroup |
createValue()
Creates a new instance of parameter values with elements initialized to the 1 on the diagonal, and 0 everywere else. |
ParameterDescriptor<Double> |
descriptor(int row,
int column)
Returns the parameter in this group for a matrix element at the specified index. row and column indices are 0 based. |
GeneralParameterDescriptor |
descriptor(String name)
Returns the parameter in this group for the specified name. |
List<GeneralParameterDescriptor> |
descriptors()
Returns the parameters in this group. |
boolean |
equals(Object object,
ComparisonMode mode)
Compares the specified object with this parameter group for equality. |
Matrix |
getMatrix(ParameterValueGroup parameters)
Constructs a matrix from a group of parameters. |
| Methods inherited from class DefaultParameterDescriptorGroup |
|---|
getMaximumOccurs, toString |
| Methods inherited from class AbstractParameterDescriptor |
|---|
formatWKT, getMinimumOccurs |
| Methods inherited from class AbstractIdentifiedObject |
|---|
equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, hashCode, nameMatches, nameMatches, nameMatches |
| Methods inherited from class FormattableObject |
|---|
getDefaultIndentation, print, setDefaultIndentation, toWKT, toWKT, toWKT |
| Methods inherited from class Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface GeneralParameterDescriptor |
|---|
getMinimumOccurs |
| Methods inherited from interface IdentifiedObject |
|---|
getAlias, getIdentifiers, getName, getRemarks, toWKT |
| Field Detail |
|---|
public static final int DEFAULT_MATRIX_SIZE
protected final ParameterDescriptor<Integer> numRow
"num_row" parameter.
protected final ParameterDescriptor<Integer> numCol
"num_col" parameter.
protected final String prefix
protected final char separator
| Constructor Detail |
|---|
public MatrixParameterDescriptors(Map<String,?> properties)
properties - Set of properties. Should contains at least "name".
public MatrixParameterDescriptors(Map<String,?> properties,
ParameterDescriptor<?>[] parameters,
String prefix,
char separator)
parameters array should contains parameters other
than matrix elements. The first parameter is assumed to be the number of rows, and
the second parameter the number of columns. All extra parameters are ignored.
properties - Set of properties. Should contains at least "name".parameters - The "num_row" and "num_col" parameters.prefix - The prefix to insert in front of parameter name for each matrix elements.separator - The separator between the row and the column index in parameter names.| Method Detail |
|---|
public final GeneralParameterDescriptor descriptor(String name)
throws ParameterNotFoundException
"elt_row_col" where
"elt_" is the prefix for all matrix elements, and row
and col are row and column indices respectively. For example "elt_2_1"
is the element name for the value at line 2 and row 1. The row and column index are 0 based.
descriptor in interface ParameterDescriptorGroupdescriptor in class DefaultParameterDescriptorGroupname - The case insensitive name of the parameter to search for.
ParameterNotFoundException - if there is no parameter for the given name.
public final ParameterDescriptor<Double> descriptor(int row,
int column)
throws IndexOutOfBoundsException
numRow and numCol parameters.
row - The row indice.column - The column indice
IndexOutOfBoundsException - if row or column is out of bounds.public final List<GeneralParameterDescriptor> descriptors()
numRow and numCol parameters.
descriptors in interface ParameterDescriptorGroupdescriptors in class DefaultParameterDescriptorGrouppublic ParameterValueGroup createValue()
numRow and numCol parameters.
createValue in interface GeneralParameterDescriptorcreateValue in interface ParameterDescriptorGroupcreateValue in class DefaultParameterDescriptorGroup
public Matrix getMatrix(ParameterValueGroup parameters)
throws InvalidParameterNameException
parameters - The group of parameters.
InvalidParameterNameException - if a parameter name was not recognized.
public boolean equals(Object object,
ComparisonMode mode)
equals in interface LenientComparableequals in class DefaultParameterDescriptorGroupobject - The object to compare to this.mode - STRICT for performing a strict comparison, or
IGNORE_METADATA for comparing only properties
relevant to transformations.
true if both objects are equal.protected int computeHashCode()
AbstractIdentifiedObject.hashCode() when first needed.
Implementation specific feature
In the Geotk implementation, the name, identifiers and remarks are not used for hash code computation.
Consequently two identified objects will return the same hash value if they are equal in the
sense of equals(…,
ComparisonMode.IGNORE_METADATA). This feature allows users to
implement metadata-insensitive HashMap.
computeHashCode in class DefaultParameterDescriptorGroup
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||