public class MatrixParameterDescriptors extends DefaultParameterDescriptorGroup
"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| Modifier and Type | Field and Description |
|---|---|
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.
|
EMPTY_ALIAS_ARRAY, EMPTY_IDENTIFIER_ARRAY, IDENTIFIER_COMPARATOR, NAME_COMPARATOR, REMARKS_COMPARATORSINGLE_LINEALIAS_KEY, IDENTIFIERS_KEY, NAME_KEY, REMARKS_KEY| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
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(AbstractIdentifiedObject object,
boolean compareMetadata)
Compares the specified object with this parameter group for equality.
|
Matrix |
getMatrix(ParameterValueGroup parameters)
Constructs a matrix from a group of parameters.
|
int |
hashCode()
Returns a hash value for this parameter.
|
getMaximumOccursformatWKT, getMinimumOccursasSet, ensureAngularUnit, ensureLinearUnit, ensureNonNull, ensureNonNull, ensureTimeUnit, equals, equals, equals, equals, getAlias, getIdentifier, getIdentifier, getIdentifiers, getName, getName, getName, getProperties, getProperties, getRemarks, nameMatches, nameMatches, nameMatchescleanupThreadLocals, toString, toWKT, toWKT, toWKT, toWKTgetMinimumOccursgetAlias, getIdentifiers, getName, getRemarks, toWKTpublic 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
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.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 indiceIndexOutOfBoundsException - 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 DefaultParameterDescriptorGrouppublic Matrix getMatrix(ParameterValueGroup parameters) throws InvalidParameterNameException
parameters - The group of parameters.InvalidParameterNameException - if a parameter name was not recognized.public boolean equals(AbstractIdentifiedObject object, boolean compareMetadata)
equals in class DefaultParameterDescriptorGroupobject - The object to compare to this.compareMetadata - true for performing a strict comparaison, or false for
comparing only properties relevant to transformations.true if both objects are equal.public int hashCode()
hashCode in class DefaultParameterDescriptorGroupCopyright © 1996–2019 Geotools. All rights reserved.