You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2017/01/21 09:00:44 UTC
svn commit: r1779706 [10/15] - in /sis/branches/JDK7: ./
core/sis-metadata/src/main/java/org/apache/sis/metadata/iso/maintenance/
core/sis-referencing/src/main/java/org/apache/sis/geometry/
core/sis-referencing/src/main/java/org/apache/sis/internal/jax...
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrices.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -16,10 +16,11 @@
*/
package org.apache.sis.referencing.operation.matrix;
+import java.util.Objects;
import org.opengis.geometry.Envelope;
import org.opengis.geometry.DirectPosition;
import org.opengis.referencing.cs.AxisDirection;
-import org.opengis.referencing.cs.CoordinateSystem; // For javadoc
+import org.opengis.referencing.cs.CoordinateSystem; // For javadoc
import org.opengis.referencing.operation.Matrix;
import org.opengis.referencing.operation.MathTransform;
import org.opengis.geometry.MismatchedDimensionException;
@@ -34,9 +35,6 @@ import org.apache.sis.internal.metadata.
import org.apache.sis.internal.referencing.Resources;
import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* {@link Matrix} factory methods and utilities.
@@ -96,10 +94,10 @@ public final class Matrices extends Stat
* {@value org.apache.sis.referencing.operation.matrix.Matrix4#SIZE} inclusive, the matrix
* is guaranteed to be an instance of one of {@link Matrix1} \u2026 {@link Matrix4} subtypes.</div>
*
- * @param size Numbers of row and columns. For an affine transform matrix, this is the number of
+ * @param size numbers of row and columns. For an affine transform matrix, this is the number of
* {@linkplain MathTransform#getSourceDimensions() source} and
* {@linkplain MathTransform#getTargetDimensions() target} dimensions + 1.
- * @return An identity matrix of the given size.
+ * @return an identity matrix of the given size.
*/
public static MatrixSIS createIdentity(final int size) {
switch (size) {
@@ -271,8 +269,10 @@ public final class Matrices extends Stat
*/
final boolean same = srcDir.equals(dstDir);
if (useEnvelopes) {
- // See the comment in transform(Envelope, Envelope) for an explanation about why
- // we use the lower/upper corners instead than getMinimum()/getMaximum() methods.
+ /*
+ * See the comment in transform(Envelope, Envelope) for an explanation about why
+ * we use the lower/upper corners instead than getMinimum()/getMaximum() methods.
+ */
final DoubleDouble scale = new DoubleDouble(same ? +1 : -1, 0);
scale.multiply(dstEnvelope.getSpan(dstIndex));
scale.divide (srcEnvelope.getSpan(srcIndex));
@@ -544,7 +544,7 @@ public final class Matrices extends Stat
* @param sourceDimensions the number of dimensions in source coordinates.
* @param selectedDimensions the 0-based indices of source ordinate values to keep.
* The length of this array will be the number of dimensions in target coordinates.
- * @return An affine transform matrix keeping only the given source dimensions, and discarding all others.
+ * @return an affine transform matrix keeping only the given source dimensions, and discarding all others.
* @throws IllegalArgumentException if a value of {@code selectedDimensions} is lower than 0
* or not smaller than {@code sourceDimensions}.
*
@@ -1075,13 +1075,13 @@ public final class Matrices extends Stat
public static String toString(final Matrix matrix) {
final int numRow = matrix.getNumRow();
final int numCol = matrix.getNumCol();
- final String[] elements = new String [numCol * numRow]; // String representation of matrix values.
- final boolean[] noFractionDigits = new boolean[numCol * numRow]; // Whether to remove the trailing ".0" for a given number.
- final boolean[] hasDecimalSeparator = new boolean[numCol]; // Whether the column has at least one number where fraction digits are shown.
- final byte[] maximumFractionDigits = new byte [numCol]; // The greatest amount of fraction digits found in a column.
- final byte[] maximumPaddingZeros = new byte [numCol * numRow]; // Maximal amount of zeros that we can append before to exceed the IEEE 754 accuracy.
- final byte[] widthBeforeFraction = new byte [numCol]; // Number of characters before the fraction digits: spacing + ('-') + integerDigits + '.'
- final byte[] columnWidth = new byte [numCol]; // Total column width.
+ final String[] elements = new String [numCol * numRow]; // String representation of matrix values.
+ final boolean[] noFractionDigits = new boolean[numCol * numRow]; // Whether to remove the trailing ".0" for a given number.
+ final boolean[] hasDecimalSeparator = new boolean[numCol]; // Whether the column has at least one number where fraction digits are shown.
+ final byte[] maximumFractionDigits = new byte [numCol]; // The greatest amount of fraction digits found in a column.
+ final byte[] maximumPaddingZeros = new byte [numCol * numRow]; // Maximal amount of zeros that we can append before to exceed the IEEE 754 accuracy.
+ final byte[] widthBeforeFraction = new byte [numCol]; // Number of characters before the fraction digits: spacing + ('-') + integerDigits + '.'
+ final byte[] columnWidth = new byte [numCol]; // Total column width.
int totalWidth = 1;
/*
* Create now the string representation of all matrix elements and measure the width
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix1.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -38,6 +38,7 @@ import org.apache.sis.internal.util.Nume
* @see Matrix3
* @see Matrix4
*/
+@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone.
public final class Matrix1 extends MatrixSIS {
/**
* Serial number for inter-operability with different versions.
@@ -64,7 +65,7 @@ public final class Matrix1 extends Matri
/**
* Creates a new matrix filled with only zero values.
*
- * @param ignore Shall always be {@code false} in current version.
+ * @param ignore shall always be {@code false} in current version.
*/
Matrix1(final boolean ignore) {
}
@@ -82,8 +83,8 @@ public final class Matrix1 extends Matri
* Creates a new matrix initialized to the specified values.
* The length of the given array must be 1.
*
- * @param elements Elements of the matrix.
- * @throws IllegalArgumentException If the given array does not have the expected length.
+ * @param elements elements of the matrix.
+ * @throws IllegalArgumentException if the given array does not have the expected length.
*
* @see #setElements(double[])
* @see Matrices#create(int, int, double[])
@@ -97,7 +98,7 @@ public final class Matrix1 extends Matri
* The specified matrix size must be {@value #SIZE}�{@value #SIZE}.
* This is not verified by this constructor, since it shall be verified by {@link Matrices}.
*
- * @param matrix The matrix to copy.
+ * @param matrix the matrix to copy.
*/
Matrix1(final Matrix matrix) {
m00 = matrix.getElement(0,0);
@@ -108,10 +109,10 @@ public final class Matrix1 extends Matri
* is already an instance of {@code Matrix1}, then it is returned unchanged. Otherwise this method
* verifies the matrix size, then copies the element in a new {@code Matrix1} object.
*
- * @param matrix The matrix to cast or copy, or {@code null}.
- * @return The matrix argument if it can be safely casted (including {@code null} argument),
+ * @param matrix the matrix to cast or copy, or {@code null}.
+ * @return the matrix argument if it can be safely casted (including {@code null} argument),
* or a copy of the given matrix otherwise.
- * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
+ * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
*/
public static Matrix1 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException {
if (matrix == null || matrix instanceof Matrix1) {
@@ -133,7 +134,7 @@ public final class Matrix1 extends Matri
/**
* Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumRow() {
@@ -143,7 +144,7 @@ public final class Matrix1 extends Matri
/**
* Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumCol() {
@@ -156,9 +157,9 @@ public final class Matrix1 extends Matri
* If the matrix is known to be an instance of {@code Matrix1},
* then the {@link #m00} field can be read directly for efficiency.
*
- * @param row The row index, which can only be 0.
- * @param column The column index, which can only be 0.
- * @return The current value.
+ * @param row the row index, which can only be 0.
+ * @param column the column index, which can only be 0.
+ * @return the current value.
*/
@Override
public final double getElement(final int row, final int column) {
@@ -175,9 +176,9 @@ public final class Matrix1 extends Matri
* If the matrix is known to be an instance of {@code Matrix1},
* then the {@link #m00} field can be set directly for efficiency.
*
- * @param row The row index, which can only be 0.
- * @param column The column index, which can only be 0.
- * @param value The new value to set.
+ * @param row the row index, which can only be 0.
+ * @param column the column index, which can only be 0.
+ * @param value the new value to set.
*/
@Override
public final void setElement(final int row, final int column, final double value) {
@@ -261,7 +262,7 @@ public final class Matrix1 extends Matri
* Returns {@code true} if the specified object is of type {@code Matrix1} and
* all of the data members are equal to the corresponding data members in this matrix.
*
- * @param object The object to compare with this matrix for equality.
+ * @param object the object to compare with this matrix for equality.
* @return {@code true} if the given object is equal to this matrix.
*/
@Override
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix2.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -39,6 +39,7 @@ import org.apache.sis.internal.util.Nume
* @see Matrix3
* @see Matrix4
*/
+@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone.
public final class Matrix2 extends MatrixSIS {
/**
* Serial number for inter-operability with different versions.
@@ -65,7 +66,7 @@ public final class Matrix2 extends Matri
/**
* Creates a new matrix filled with only zero values.
*
- * @param ignore Shall always be {@code false} in current version.
+ * @param ignore shall always be {@code false} in current version.
*/
Matrix2(final boolean ignore) {
}
@@ -73,10 +74,10 @@ public final class Matrix2 extends Matri
/**
* Creates a new matrix initialized to the specified values.
*
- * @param m00 The first matrix element in the first row.
- * @param m01 The second matrix element in the first row.
- * @param m10 The first matrix element in the second row.
- * @param m11 The second matrix element in the second row.
+ * @param m00 the first matrix element in the first row.
+ * @param m01 the second matrix element in the first row.
+ * @param m10 the first matrix element in the second row.
+ * @param m11 the second matrix element in the second row.
*/
public Matrix2(final double m00, final double m01,
final double m10, final double m11)
@@ -89,8 +90,8 @@ public final class Matrix2 extends Matri
* Creates a new matrix initialized to the specified values.
* The length of the given array must be 4 and the values in the same order than the above constructor.
*
- * @param elements Elements of the matrix. Column indices vary fastest.
- * @throws IllegalArgumentException If the given array does not have the expected length.
+ * @param elements elements of the matrix. Column indices vary fastest.
+ * @throws IllegalArgumentException if the given array does not have the expected length.
*
* @see #setElements(double[])
* @see Matrices#create(int, int, double[])
@@ -104,7 +105,7 @@ public final class Matrix2 extends Matri
* The specified matrix size must be {@value #SIZE}�{@value #SIZE}.
* This is not verified by this constructor, since it shall be verified by {@link Matrices}.
*
- * @param matrix The matrix to copy.
+ * @param matrix the matrix to copy.
*/
Matrix2(final Matrix matrix) {
m00 = matrix.getElement(0,0);
@@ -118,10 +119,10 @@ public final class Matrix2 extends Matri
* is already an instance of {@code Matrix2}, then it is returned unchanged. Otherwise this method
* verifies the matrix size, then copies all elements in a new {@code Matrix2} object.
*
- * @param matrix The matrix to cast or copy, or {@code null}.
- * @return The matrix argument if it can be safely casted (including {@code null} argument),
+ * @param matrix the matrix to cast or copy, or {@code null}.
+ * @return the matrix argument if it can be safely casted (including {@code null} argument),
* or a copy of the given matrix otherwise.
- * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
+ * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
*/
public static Matrix2 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException {
if (matrix == null || matrix instanceof Matrix2) {
@@ -143,7 +144,7 @@ public final class Matrix2 extends Matri
/**
* Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumRow() {
@@ -153,7 +154,7 @@ public final class Matrix2 extends Matri
/**
* Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumCol() {
@@ -166,9 +167,9 @@ public final class Matrix2 extends Matri
* If the matrix is known to be an instance of {@code Matrix2},
* then the {@link #m00} \u2026 {@link #m11} fields can be read directly for efficiency.
*
- * @param row The row index, which can only be 0 or 1.
- * @param column The column index, which can only be 0 or 1.
- * @return The current value at the given row and column.
+ * @param row the row index, which can only be 0 or 1.
+ * @param column the column index, which can only be 0 or 1.
+ * @return the current value at the given row and column.
*/
@Override
public final double getElement(final int row, final int column) {
@@ -189,9 +190,9 @@ public final class Matrix2 extends Matri
* If the matrix is known to be an instance of {@code Matrix2},
* then the {@link #m00} \u2026 {@link #m11} fields can be set directly for efficiency.
*
- * @param row The row index, which can only be 0 or 1.
- * @param column The column index, which can only be 0 or 1.
- * @param value The new value to set at the given row and column.
+ * @param row the row index, which can only be 0 or 1.
+ * @param column the column index, which can only be 0 or 1.
+ * @param value the new value to set at the given row and column.
*/
@Override
public final void setElement(final int row, final int column, final double value) {
@@ -285,7 +286,7 @@ public final class Matrix2 extends Matri
* Returns {@code true} if the specified object is of type {@code Matrix2} and
* all of the data members are equal to the corresponding data members in this matrix.
*
- * @param object The object to compare with this matrix for equality.
+ * @param object the object to compare with this matrix for equality.
* @return {@code true} if the given object is equal to this matrix.
*/
@Override
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix3.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -38,6 +38,7 @@ import org.opengis.referencing.operation
* @see Matrix2
* @see Matrix4
*/
+@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone.
public final class Matrix3 extends MatrixSIS {
/**
* Serial number for inter-operability with different versions.
@@ -69,7 +70,7 @@ public final class Matrix3 extends Matri
/**
* Creates a new matrix filled with only zero values.
*
- * @param ignore Shall always be {@code false} in current version.
+ * @param ignore shall always be {@code false} in current version.
*/
Matrix3(final boolean ignore) {
}
@@ -77,15 +78,15 @@ public final class Matrix3 extends Matri
/**
* Creates a new matrix initialized to the specified values.
*
- * @param m00 The first matrix element in the first row.
- * @param m01 The second matrix element in the first row.
- * @param m02 The third matrix element in the first row.
- * @param m10 The first matrix element in the second row.
- * @param m11 The second matrix element in the second row.
- * @param m12 The third matrix element in the second row.
- * @param m20 The first matrix element in the third row.
- * @param m21 The second matrix element in the third row.
- * @param m22 The third matrix element in the third row.
+ * @param m00 the first matrix element in the first row.
+ * @param m01 the second matrix element in the first row.
+ * @param m02 the third matrix element in the first row.
+ * @param m10 the first matrix element in the second row.
+ * @param m11 the second matrix element in the second row.
+ * @param m12 the third matrix element in the second row.
+ * @param m20 the first matrix element in the third row.
+ * @param m21 the second matrix element in the third row.
+ * @param m22 the third matrix element in the third row.
*/
public Matrix3(final double m00, final double m01, final double m02,
final double m10, final double m11, final double m12,
@@ -100,8 +101,8 @@ public final class Matrix3 extends Matri
* Creates a new matrix initialized to the specified values.
* The length of the given array must be 9 and the values in the same order than the above constructor.
*
- * @param elements Elements of the matrix. Column indices vary fastest.
- * @throws IllegalArgumentException If the given array does not have the expected length.
+ * @param elements elements of the matrix. Column indices vary fastest.
+ * @throws IllegalArgumentException if the given array does not have the expected length.
*
* @see #setElements(double[])
* @see Matrices#create(int, int, double[])
@@ -115,7 +116,7 @@ public final class Matrix3 extends Matri
* The specified matrix size must be {@value #SIZE}�{@value #SIZE}.
* This is not verified by this constructor, since it shall be verified by {@link Matrices}.
*
- * @param matrix The matrix to copy.
+ * @param matrix the matrix to copy.
*/
Matrix3(final Matrix matrix) {
for (int j=0; j<SIZE; j++) {
@@ -130,10 +131,10 @@ public final class Matrix3 extends Matri
* is already an instance of {@code Matrix3}, then it is returned unchanged. Otherwise this method
* verifies the matrix size, then copies all elements in a new {@code Matrix3} object.
*
- * @param matrix The matrix to cast or copy, or {@code null}.
- * @return The matrix argument if it can be safely casted (including {@code null} argument),
+ * @param matrix the matrix to cast or copy, or {@code null}.
+ * @return the matrix argument if it can be safely casted (including {@code null} argument),
* or a copy of the given matrix otherwise.
- * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
+ * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
*/
public static Matrix3 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException {
if (matrix == null || matrix instanceof Matrix3) {
@@ -155,7 +156,7 @@ public final class Matrix3 extends Matri
/**
* Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumRow() {
@@ -165,7 +166,7 @@ public final class Matrix3 extends Matri
/**
* Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumCol() {
@@ -178,9 +179,9 @@ public final class Matrix3 extends Matri
* If the matrix is known to be an instance of {@code Matrix3},
* then the {@link #m00} \u2026 {@link #m22} fields can be read directly for efficiency.
*
- * @param row The row index, from 0 inclusive to {@value #SIZE} exclusive.
- * @param column The column index, from 0 inclusive to {@value #SIZE} exclusive.
- * @return The current value at the given row and column.
+ * @param row the row index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @param column the column index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @return the current value at the given row and column.
*/
@Override
public final double getElement(final int row, final int column) {
@@ -206,9 +207,9 @@ public final class Matrix3 extends Matri
* If the matrix is known to be an instance of {@code Matrix3},
* then the {@link #m00} \u2026 {@link #m22} fields can be set directly for efficiency.
*
- * @param row The row index, from 0 inclusive to {@value #SIZE} exclusive.
- * @param column The column index, from 0 inclusive to {@value #SIZE} exclusive.
- * @param value The new value to set at the given row and column.
+ * @param row the row index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @param column the column index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @param value the new value to set at the given row and column.
*/
@Override
public final void setElement(final int row, final int column, final double value) {
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Matrix4.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -39,6 +39,7 @@ import org.opengis.referencing.operation
* @see Matrix2
* @see Matrix3
*/
+@SuppressWarnings("CloneableClassWithoutClone") // No field in this class needs clone.
public final class Matrix4 extends MatrixSIS {
/**
* Serial number for inter-operability with different versions.
@@ -77,7 +78,7 @@ public final class Matrix4 extends Matri
/**
* Creates a new matrix filled with only zero values.
*
- * @param ignore Shall always be {@code false} in current version.
+ * @param ignore shall always be {@code false} in current version.
*/
Matrix4(final boolean ignore) {
}
@@ -85,22 +86,22 @@ public final class Matrix4 extends Matri
/**
* Creates a new matrix initialized to the specified values.
*
- * @param m00 The first matrix element in the first row.
- * @param m01 The second matrix element in the first row.
- * @param m02 The third matrix element in the first row.
- * @param m03 The forth matrix element in the first row.
- * @param m10 The first matrix element in the second row.
- * @param m11 The second matrix element in the second row.
- * @param m12 The third matrix element in the second row.
- * @param m13 The forth matrix element in the second row.
- * @param m20 The first matrix element in the third row.
- * @param m21 The second matrix element in the third row.
- * @param m22 The third matrix element in the third row.
- * @param m23 The forth matrix element in the third row.
- * @param m30 The first matrix element in the forth row.
- * @param m31 The second matrix element in the forth row.
- * @param m32 The third matrix element in the forth row.
- * @param m33 The forth matrix element in the forth row.
+ * @param m00 the first matrix element in the first row.
+ * @param m01 the second matrix element in the first row.
+ * @param m02 the third matrix element in the first row.
+ * @param m03 the forth matrix element in the first row.
+ * @param m10 the first matrix element in the second row.
+ * @param m11 the second matrix element in the second row.
+ * @param m12 the third matrix element in the second row.
+ * @param m13 the forth matrix element in the second row.
+ * @param m20 the first matrix element in the third row.
+ * @param m21 the second matrix element in the third row.
+ * @param m22 the third matrix element in the third row.
+ * @param m23 the forth matrix element in the third row.
+ * @param m30 the first matrix element in the forth row.
+ * @param m31 the second matrix element in the forth row.
+ * @param m32 the third matrix element in the forth row.
+ * @param m33 the forth matrix element in the forth row.
*/
public Matrix4(final double m00, final double m01, final double m02, final double m03,
final double m10, final double m11, final double m12, final double m13,
@@ -117,8 +118,8 @@ public final class Matrix4 extends Matri
* Creates a new matrix initialized to the specified values.
* The length of the given array must be 16 and the values in the same order than the above constructor.
*
- * @param elements Elements of the matrix. Column indices vary fastest.
- * @throws IllegalArgumentException If the given array does not have the expected length.
+ * @param elements elements of the matrix. Column indices vary fastest.
+ * @throws IllegalArgumentException if the given array does not have the expected length.
*
* @see #setElements(double[])
* @see Matrices#create(int, int, double[])
@@ -132,7 +133,7 @@ public final class Matrix4 extends Matri
* The specified matrix size must be {@value #SIZE}�{@value #SIZE}.
* This is not verified by this constructor, since it shall be verified by {@link Matrices}.
*
- * @param matrix The matrix to copy.
+ * @param matrix the matrix to copy.
* @throws IllegalArgumentException if the given matrix is not of the expected size.
*/
Matrix4(final Matrix matrix) throws IllegalArgumentException {
@@ -148,10 +149,10 @@ public final class Matrix4 extends Matri
* is already an instance of {@code Matrix4}, then it is returned unchanged. Otherwise this method
* verifies the matrix size, then copies all elements in a new {@code Matrix4} object.
*
- * @param matrix The matrix to cast or copy, or {@code null}.
- * @return The matrix argument if it can be safely casted (including {@code null} argument),
+ * @param matrix the matrix to cast or copy, or {@code null}.
+ * @return the matrix argument if it can be safely casted (including {@code null} argument),
* or a copy of the given matrix otherwise.
- * @throws MismatchedMatrixSizeException If the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
+ * @throws MismatchedMatrixSizeException if the size of the given matrix is not {@value #SIZE}�{@value #SIZE}.
*/
public static Matrix4 castOrCopy(final Matrix matrix) throws MismatchedMatrixSizeException {
if (matrix == null || matrix instanceof Matrix4) {
@@ -173,7 +174,7 @@ public final class Matrix4 extends Matri
/**
* Returns the number of rows in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumRow() {
@@ -183,7 +184,7 @@ public final class Matrix4 extends Matri
/**
* Returns the number of columns in this matrix, which is always {@value #SIZE} in this implementation.
*
- * @return Always {@value #SIZE}.
+ * @return always {@value #SIZE}.
*/
@Override
public final int getNumCol() {
@@ -196,9 +197,9 @@ public final class Matrix4 extends Matri
* If the matrix is known to be an instance of {@code Matrix4},
* then the {@link #m00} \u2026 {@link #m33} fields can be read directly for efficiency.
*
- * @param row The row index, from 0 inclusive to {@value #SIZE} exclusive.
- * @param column The column index, from 0 inclusive to {@value #SIZE} exclusive.
- * @return The current value at the given row and column.
+ * @param row the row index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @param column the column index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @return the current value at the given row and column.
*/
@Override
public final double getElement(final int row, final int column) {
@@ -231,9 +232,9 @@ public final class Matrix4 extends Matri
* If the matrix is known to be an instance of {@code Matrix4},
* then the {@link #m00} \u2026 {@link #m33} fields can be set directly for efficiency.
*
- * @param row The row index, from 0 inclusive to {@value #SIZE} exclusive.
- * @param column The column index, from 0 inclusive to {@value #SIZE} exclusive.
- * @param value The new value to set at the given row and column.
+ * @param row the row index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @param column the column index, from 0 inclusive to {@value #SIZE} exclusive.
+ * @param value the new value to set at the given row and column.
*/
@Override
public final void setElement(final int row, final int column, final double value) {
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MatrixSIS.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -18,7 +18,7 @@ package org.apache.sis.referencing.opera
import java.util.Arrays;
import java.io.Serializable;
-import java.awt.geom.AffineTransform; // For javadoc
+import java.awt.geom.AffineTransform; // For javadoc
import org.opengis.referencing.operation.Matrix;
import org.apache.sis.internal.referencing.ExtendedPrecisionMatrix;
import org.apache.sis.internal.util.DoubleDouble;
@@ -273,17 +273,17 @@ public abstract class MatrixSIS implemen
/**
* Sets elements in a sub-region of this matrix, optionally including error terms.
*
- * @param source row-major values as given by {@link ExtendedPrecisionMatrix#getExtendedElements()}.
- * @param length number of elements ({@code numRow} � {@code numCol}) in the source matrix, not including error terms.
- * @param stride number of columns in the source matrix, used for computing indices in {@code source} array.
- * @param srcRow index of the first row from the {@code source} to copy in {@code this}.
- * @param srcCol index of the first column from the {@code source} to copy in {@code this}.
- * @param dstRow index of the first row in {@code this} where to copy the {@code source} values.
- * @param dstCol index of the first column in {@code this} where to copy the {@code source} values.
- * @param numRow number of rows to copy.
- * @param numCol number of columns to copy.
- * @param transfer if both {@code source} and {@code this} use extended precision,
- * the temporary object to use for transferring values. Otherwise {@code null}.
+ * @param source row-major values as given by {@link ExtendedPrecisionMatrix#getExtendedElements()}.
+ * @param length number of elements ({@code numRow} � {@code numCol}) in the source matrix, not including error terms.
+ * @param stride number of columns in the source matrix, used for computing indices in {@code source} array.
+ * @param srcRow index of the first row from the {@code source} to copy in {@code this}.
+ * @param srcCol index of the first column from the {@code source} to copy in {@code this}.
+ * @param dstRow index of the first row in {@code this} where to copy the {@code source} values.
+ * @param dstCol index of the first column in {@code this} where to copy the {@code source} values.
+ * @param numRow number of rows to copy.
+ * @param numCol number of columns to copy.
+ * @param transfer if both {@code source} and {@code this} use extended precision,
+ * the temporary object to use for transferring values. Otherwise {@code null}.
*/
final void setElements(final double[] source, final int length, final int stride, final DoubleDouble transfer,
int srcRow, final int srcCol,
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/MismatchedMatrixSizeException.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -51,7 +51,7 @@ public class MismatchedMatrixSizeExcepti
/**
* Constructs a new exception with the specified detail message.
*
- * @param message The detail message, or {@code null} if none.
+ * @param message the detail message, or {@code null} if none.
*/
public MismatchedMatrixSizeException(final String message) {
super(message);
@@ -60,8 +60,8 @@ public class MismatchedMatrixSizeExcepti
/**
* Constructs a new exception with the specified detail message and cause.
*
- * @param message The detail message, or {@code null} if none.
- * @param cause The cause, or {@code null} if none.
+ * @param message the detail message, or {@code null} if none.
+ * @param cause the cause, or {@code null} if none.
*/
public MismatchedMatrixSizeException(final String message, final Throwable cause) {
super(message, cause);
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NonSquareMatrix.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -41,11 +41,11 @@ final class NonSquareMatrix extends Gene
* If {@code setToIdentity} is {@code true}, then the elements
* on the diagonal (<var>j</var> == <var>i</var>) are set to 1.
*
- * @param numRow Number of rows.
- * @param numCol Number of columns.
- * @param setToIdentity {@code true} for initializing the matrix to the identity matrix,
- * or {@code false} for leaving it initialized to zero.
- * @param precision 1 for normal precision, or 2 for extended precision.
+ * @param numRow number of rows.
+ * @param numCol number of columns.
+ * @param setToIdentity {@code true} for initializing the matrix to the identity matrix,
+ * or {@code false} for leaving it initialized to zero.
+ * @param precision 1 for normal precision, or 2 for extended precision.
*/
NonSquareMatrix(final int numRow, final int numCol, final boolean setToIdentity, final int precision) {
super(numRow, numCol, setToIdentity, precision);
@@ -56,9 +56,9 @@ final class NonSquareMatrix extends Gene
* The array values are copied in one row at a time in row major fashion.
* The array shall be exactly {@code numRow*numCol} in length.
*
- * @param numRow Number of rows.
- * @param numCol Number of columns.
- * @param elements Initial values.
+ * @param numRow number of rows.
+ * @param numCol number of columns.
+ * @param elements initial values.
*/
NonSquareMatrix(final int numRow, final int numCol, final double[] elements) {
super(numRow, numCol, elements);
@@ -67,7 +67,7 @@ final class NonSquareMatrix extends Gene
/**
* Constructs a new matrix and copies the initial values from the given matrix.
*
- * @param matrix The matrix to copy.
+ * @param matrix the matrix to copy.
*/
NonSquareMatrix(final Matrix matrix) {
super(matrix);
@@ -85,9 +85,9 @@ final class NonSquareMatrix extends Gene
*/
@Override
public void transpose() {
- final short numRow = this.numRow; // Protection against accidental changes before we are done.
+ final short numRow = this.numRow; // Protection against accidental changes before we are done.
final short numCol = this.numCol;
- final int errors = indexOfErrors(numRow, numCol, elements); // Where error values start, or 0 if none.
+ final int errors = indexOfErrors(numRow, numCol, elements); // Where error values start, or 0 if none.
final double[] copy = elements.clone();
int k = 0;
for (int j=0; j<numRow; j++) {
@@ -178,22 +178,22 @@ final class NonSquareMatrix extends Gene
* like time.
*/
private MatrixSIS inverseDimensionReduction() throws NoninvertibleMatrixException {
- final int numRow = this.numRow; // Protection against accidental changes.
+ final int numRow = this.numRow; // Protection against accidental changes.
final int numCol = this.numCol;
final int length = numRow * numCol;
int i = numCol;
- int oi = numCol - numRow; // Initialized to the maximal amount of columns that we may omit.
+ int oi = numCol - numRow; // Initialized to the maximal amount of columns that we may omit.
final int[] omitted = new int[oi];
next: do {
if (--i < 0) {
- throw nonInvertible(); // Not enough columns that we can omit.
+ throw nonInvertible(); // Not enough columns that we can omit.
}
for (int j=length + i; (j -= numCol) >= 0;) {
if (elements[j] != 0) {
continue next;
}
}
- omitted[--oi] = i; // Found a column which contains only 0 elements.
+ omitted[--oi] = i; // Found a column which contains only 0 elements.
} while (oi != 0);
/*
* Found enough columns containing only zero elements. Create a square matrix omitting those columns,
@@ -203,7 +203,7 @@ next: do {
int j = 0;
for (i=0; i<numCol; i++) {
if (oi != omitted.length && i == omitted[oi]) oi++;
- else copyColumn(this, i, squareMatrix, j++); // Copy only if not skipped.
+ else copyColumn(this, i, squareMatrix, j++); // Copy only if not skipped.
}
// If the source matrix does not use double-double arithmetic, infer the error terms.
if (indexOfErrors(numRow, numCol, elements) == 0) {
@@ -217,7 +217,7 @@ next: do {
final NonSquareMatrix inverse = new NonSquareMatrix(numCol, numRow, false, 2);
for (oi=0, j=0, i=0; i<numCol; i++) {
if (oi != omitted.length && i == omitted[oi]) {
- inverse.setElement(i, numRow-1, Double.NaN); // Translation term to NaN, remaining to 0.
+ inverse.setElement(i, numRow-1, Double.NaN); // Translation term to NaN, remaining to 0.
oi++;
} else {
copyRow(squareMatrix, j++, inverse, i);
@@ -292,10 +292,10 @@ next: do {
* The target matrix must have the same number of rows than the source matrix, and must have enough
* room for error terms (this is not verified).
*
- * @param source The matrix from which to copy a column.
- * @param srcIndex Index of the column to copy from the source matrix.
- * @param target The matrix where to copy the column.
- * @param dstIndex Index of the column where to copy in the target matrix.
+ * @param source the matrix from which to copy a column.
+ * @param srcIndex index of the column to copy from the source matrix.
+ * @param target the matrix where to copy the column.
+ * @param dstIndex index of the column where to copy in the target matrix.
*/
private static void copyColumn(final GeneralMatrix source, int srcIndex, final GeneralMatrix target, int dstIndex) {
assert target.numRow == source.numRow;
@@ -311,10 +311,10 @@ next: do {
* The target matrix must have the same number of columns than the source matrix, and must have
* enough room for error terms (this is not verified).
*
- * @param source The matrix from which to copy a row.
- * @param srcIndex Index of the row to copy from the source matrix.
- * @param target The matrix where to copy the row.
- * @param dstIndex Index of the row where to copy in the target matrix.
+ * @param source the matrix from which to copy a row.
+ * @param srcIndex index of the row to copy from the source matrix.
+ * @param target the matrix where to copy the row.
+ * @param dstIndex index of the row where to copy in the target matrix.
*/
private static void copyRow(final GeneralMatrix source, int srcIndex, final GeneralMatrix target, int dstIndex) {
final int numCol = target.numCol;
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NoninvertibleMatrixException.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NoninvertibleMatrixException.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NoninvertibleMatrixException.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/NoninvertibleMatrixException.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -49,7 +49,7 @@ public class NoninvertibleMatrixExceptio
/**
* Constructs a new exception with the specified detail message.
*
- * @param message The detail message, or {@code null} if none.
+ * @param message the detail message, or {@code null} if none.
*/
public NoninvertibleMatrixException(final String message) {
super(message);
@@ -58,8 +58,8 @@ public class NoninvertibleMatrixExceptio
/**
* Constructs a new exception with the specified detail message and cause.
*
- * @param message The detail message, or {@code null} if none.
- * @param cause The cause, or {@code null} if none.
+ * @param message the detail message, or {@code null} if none.
+ * @param cause the cause, or {@code null} if none.
*/
public NoninvertibleMatrixException(final String message, final Throwable cause) {
super(message, cause);
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/matrix/Solver.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -110,9 +110,9 @@ final class Solver implements Matrix {
/**
* Computes the inverse of the given matrix. This method shall be invoked only for square matrices.
*
- * @param X The matrix to invert, which must be square.
- * @param noChange If {@code true}, do not allow modifications to the {@code X} matrix.
- * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular.
+ * @param X the matrix to invert, which must be square.
+ * @param noChange if {@code true}, do not allow modifications to the {@code X} matrix.
+ * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular.
*/
static MatrixSIS inverse(final Matrix X, final boolean noChange) throws NoninvertibleMatrixException {
final int size = X.getNumRow();
@@ -127,9 +127,9 @@ final class Solver implements Matrix {
* Solves {@code X} � <var>U</var> = {@code Y}.
* This method is an adaptation of the {@code LUDecomposition} class of the JAMA matrix package.
*
- * @param X The matrix to invert.
- * @param Y The desired result of {@code X} � <var>U</var>.
- * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular.
+ * @param X the matrix to invert.
+ * @param Y the desired result of {@code X} � <var>U</var>.
+ * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular.
*/
static MatrixSIS solve(final Matrix X, final Matrix Y) throws NoninvertibleMatrixException {
final int size = X.getNumRow();
@@ -170,13 +170,13 @@ final class Solver implements Matrix {
* }
* }
*
- * @param X The matrix to invert, which must be square.
- * @param Y The desired result of {@code X} � <var>U</var>.
- * @param eltY Elements and error terms of the {@code Y} matrix, or {@code null} if not available.
- * @param size The value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}.
- * @param innerSize The value of {@code Y.getNumCol()}.
- * @param noChange If {@code true}, do not allow modifications to the {@code X} matrix.
- * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular.
+ * @param X the matrix to invert, which must be square.
+ * @param Y the desired result of {@code X} � <var>U</var>.
+ * @param eltY elements and error terms of the {@code Y} matrix, or {@code null} if not available.
+ * @param size the value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}.
+ * @param innerSize the value of {@code Y.getNumCol()}.
+ * @param noChange if {@code true}, do not allow modifications to the {@code X} matrix.
+ * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular.
*/
private static MatrixSIS solve(final Matrix X, final Matrix Y, final double[] eltY,
final int size, final int innerSize, final boolean noChange) throws NoninvertibleMatrixException
@@ -210,12 +210,14 @@ searchNaN: for (int flatIndex = (size -
* that the column contains only zero values except on the current line.
*/
int columnOfScale = -1;
- if (i != lastRowOrColumn) { // Enter only if this column is not for translations.
- columnOfScale = i; // The non-translation element is the scale factor.
- for (int k=lastRowOrColumn; --k>=0;) { // Scan all other rows in the current column.
+ if (i != lastRowOrColumn) { // Enter only if this column is not for translations.
+ columnOfScale = i; // The non-translation element is the scale factor.
+ for (int k=lastRowOrColumn; --k>=0;) { // Scan all other rows in the current column.
if (k != j && LU[k*size + i] != 0) {
- // Found a non-zero element in the current column.
- // We can not proceed - cancel everything.
+ /*
+ * Found a non-zero element in the current column.
+ * We can not proceed - cancel everything.
+ */
indexOfNaN = null;
indexCount = 0;
break searchNaN;
@@ -230,8 +232,10 @@ searchNaN: for (int flatIndex = (size -
for (int k=lastRowOrColumn; --k>=0;) {
if (k != i && LU[j*size + k] != 0) {
if (columnOfScale >= 0) {
- // If there is more than 1 non-zero element,
- // abandon the attempt to handle NaN values.
+ /*
+ * If there is more than 1 non-zero element,
+ * abandon the attempt to handle NaN values.
+ */
indexOfNaN = null;
indexCount = 0;
break searchNaN;
@@ -244,7 +248,7 @@ searchNaN: for (int flatIndex = (size -
* Remember its index; the replacement will be performed later.
*/
if (indexOfNaN == null) {
- indexOfNaN = new int[lastRowOrColumn * (2*TUPLE_SIZE)]; // At most one scale and one offset per row.
+ indexOfNaN = new int[lastRowOrColumn * (2*TUPLE_SIZE)]; // At most one scale and one offset per row.
}
indexOfNaN[indexCount++] = i;
indexOfNaN[indexCount++] = j;
@@ -307,12 +311,12 @@ searchNaN: for (int flatIndex = (size -
* Y.getNumCol() == innerSize;
* }
*
- * @param LU Elements of the {@code X} matrix to invert, including error terms.
- * @param Y The desired result of {@code X} � <var>U</var>.
- * @param eltY Elements and error terms of the {@code Y} matrix, or {@code null} if not available.
- * @param size The value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}.
- * @param innerSize The value of {@code Y.getNumCol()}.
- * @throws NoninvertibleMatrixException If the {@code X} matrix is not square or singular.
+ * @param LU elements of the {@code X} matrix to invert, including error terms.
+ * @param Y the desired result of {@code X} � <var>U</var>.
+ * @param eltY elements and error terms of the {@code Y} matrix, or {@code null} if not available.
+ * @param size the value of {@code X.getNumRow()}, {@code X.getNumCol()} and {@code Y.getNumRow()}.
+ * @param innerSize the value of {@code Y.getNumCol()}.
+ * @throws NoninvertibleMatrixException if the {@code X} matrix is not square or singular.
*/
private static MatrixSIS solve(final double[] LU, final Matrix Y, final double[] eltY,
final int size, final int innerSize) throws NoninvertibleMatrixException
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/AlbersEqualArea.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -81,8 +81,8 @@ public class AlbersEqualArea extends Equ
/**
* Creates an Albers Equal Area projection from the given parameters.
*
- * @param method Description of the projection parameters.
- * @param parameters The parameter values of the projection to create.
+ * @param method description of the projection parameters.
+ * @param parameters the parameter values of the projection to create.
*/
public AlbersEqualArea(final OperationMethod method, final Parameters parameters) {
this(initializer(method, parameters));
@@ -200,7 +200,7 @@ public class AlbersEqualArea extends Equ
* is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.</p>
*
* @param factory The factory to use for creating the transform.
- * @return The map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
+ * @return the map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
* @throws FactoryException if an error occurred while creating a transform.
*/
@Override
@@ -216,7 +216,7 @@ public class AlbersEqualArea extends Equ
* Converts the specified (\u03b8,\u03c6) coordinate (units in radians) and stores the result in {@code dstPts}.
* In addition, opportunistically computes the projection derivative if {@code derivate} is {@code true}.
*
- * @return The matrix of the projection derivative at the given source position,
+ * @return the matrix of the projection derivative at the given source position,
* or {@code null} if the {@code derivate} argument is {@code false}.
* @throws ProjectionException if the coordinate can not be converted.
*/
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/CylindricalEqualArea.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -188,8 +188,8 @@ public class CylindricalEqualArea extend
* <p>The non-linear part of the returned transform will be {@code this} transform, except if the ellipsoid
* is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.</p>
*
- * @param factory The factory to use for creating the transform.
- * @return The map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
+ * @param factory the factory to use for creating the transform.
+ * @return the map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
* @throws FactoryException if an error occurred while creating a transform.
*/
@Override
@@ -206,7 +206,7 @@ public class CylindricalEqualArea extend
* (linear distance on a unit sphere). In addition, opportunistically computes the projection derivative
* if {@code derivate} is {@code true}.
*
- * @return The matrix of the projection derivative at the given source position,
+ * @return the matrix of the projection derivative at the given source position,
* or {@code null} if the {@code derivate} argument is {@code false}.
* @throws ProjectionException if the coordinate can not be converted.
*/
@@ -295,7 +295,7 @@ public class CylindricalEqualArea extend
/**
* Constructs a new map projection from the parameters of the given projection.
*
- * @param other The other projection (usually ellipsoidal) from which to copy the parameters.
+ * @param other the other projection (usually ellipsoidal) from which to copy the parameters.
*/
Spherical(final CylindricalEqualArea other) {
super(other);
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Initializer.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -185,7 +185,7 @@ final class Initializer {
eccentricitySquared.subtract(f);
} else {
final DoubleDouble rs = new DoubleDouble(b);
- rs.divide(k); // rs = b/a
+ rs.divide(k); // rs = b/a
rs.square();
eccentricitySquared.value = 1;
eccentricitySquared.subtract(rs);
@@ -321,9 +321,10 @@ final class Initializer {
final DoubleDouble t = verbatim(sin\u03c6);
t.square();
t.multiply(eccentricitySquared);
-
- // Compute 1 - \u212f�\u22c5sin�\u03c6. Since \u212f�\u22c5sin�\u03c6 may be small,
- // this is where double-double arithmetic has more value.
+ /*
+ * Compute 1 - \u212f�\u22c5sin�\u03c6. Since \u212f�\u22c5sin�\u03c6 may be small,
+ * this is where double-double arithmetic has more value.
+ */
t.negate();
t.add(1,0);
return t;
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/LambertConicConformal.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -392,7 +392,7 @@ public class LambertConicConformal exten
* Converts the specified (\u03b8,\u03c6) coordinate (units in radians) and stores the result in {@code dstPts}.
* In addition, opportunistically computes the projection derivative if {@code derivate} is {@code true}.
*
- * @return The matrix of the projection derivative at the given source position,
+ * @return the matrix of the projection derivative at the given source position,
* or {@code null} if the {@code derivate} argument is {@code false}.
* @throws ProjectionException if the coordinate can not be converted.
*/
@@ -503,7 +503,7 @@ public class LambertConicConformal exten
/**
* Constructs a new map projection from the parameters of the given projection.
*
- * @param other The other projection (usually ellipsoidal) from which to copy the parameters.
+ * @param other the other projection (usually ellipsoidal) from which to copy the parameters.
*/
protected Spherical(final LambertConicConformal other) {
super(other);
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/Mercator.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -138,8 +138,8 @@ public class Mercator extends ConformalP
* <li><cite>"Miller Cylindrical"</cite>.</li>
* </ul>
*
- * @param method Description of the projection parameters.
- * @param parameters The parameter values of the projection to create.
+ * @param method description of the projection parameters.
+ * @param parameters the parameter values of the projection to create.
*/
public Mercator(final OperationMethod method, final Parameters parameters) {
this(initializer(method, parameters));
@@ -310,8 +310,8 @@ public class Mercator extends ConformalP
* <p>The non-linear part of the returned transform will be {@code this} transform, except if the ellipsoid
* is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.</p>
*
- * @param factory The factory to use for creating the transform.
- * @return The map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
+ * @param factory the factory to use for creating the transform.
+ * @return the map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
* @throws FactoryException if an error occurred while creating a transform.
*/
@Override
@@ -328,7 +328,7 @@ public class Mercator extends ConformalP
* (linear distance on a unit sphere). In addition, opportunistically computes the projection derivative
* if {@code derivate} is {@code true}.
*
- * @return The matrix of the projection derivative at the given source position,
+ * @return the matrix of the projection derivative at the given source position,
* or {@code null} if the {@code derivate} argument is {@code false}.
* @throws ProjectionException if the coordinate can not be converted.
*/
@@ -349,8 +349,10 @@ public class Mercator extends ConformalP
if (\u03c6 == 0) {
y = \u03c6;
} else {
- // See the javadoc of the Spherical inner class for a note
- // about why we perform explicit checks for the pole cases.
+ /*
+ * See the javadoc of the Spherical inner class for a note
+ * about why we perform explicit checks for the pole cases.
+ */
final double a = abs(\u03c6);
if (a < PI/2) {
y = log(expOfNorthing(\u03c6, eccentricity * sin\u03c6)); // Snyder (7-7)
@@ -391,8 +393,10 @@ public class Mercator extends ConformalP
while (--numPts >= 0) {
final double \u03c6 = dstPts[dstOff += 2]; // Same as srcPts[srcOff + 1].
if (\u03c6 != 0) {
- // See the javadoc of the Spherical inner class for a note
- // about why we perform explicit checks for the pole cases.
+ /*
+ * See the javadoc of the Spherical inner class for a note
+ * about why we perform explicit checks for the pole cases.
+ */
final double a = abs(\u03c6);
final double y;
if (a < PI/2) {
@@ -459,7 +463,7 @@ public class Mercator extends ConformalP
/**
* Constructs a new map projection from the parameters of the given projection.
*
- * @param other The other projection (usually ellipsoidal) from which to copy the parameters.
+ * @param other the other projection (usually ellipsoidal) from which to copy the parameters.
*/
Spherical(final Mercator other) {
super(other);
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/NormalizedProjection.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -18,6 +18,7 @@ package org.apache.sis.referencing.opera
import java.util.Map;
import java.util.HashMap;
+import java.util.Objects;
import java.io.Serializable;
import java.lang.reflect.Modifier;
import org.opengis.metadata.Identifier;
@@ -54,9 +55,6 @@ import org.apache.sis.util.resources.Err
import static java.lang.Math.*;
-// Branch-dependent imports
-import java.util.Objects;
-
/**
* Base class for conversion services between ellipsoidal and cartographic projections.
@@ -401,10 +399,10 @@ public abstract class NormalizedProjecti
* this constructor. But those values will be converted to the units of measurement specified by the parameter
* descriptors in the {@code roles} map, which must be the above-cited units.
*
- * @param method Description of the map projection parameters.
- * @param parameters The parameters of the projection to be created.
- * @param roles Parameters to look for <cite>central meridian</cite>, <cite>scale factor</cite>,
- * <cite>false easting</cite>, <cite>false northing</cite> and other values.
+ * @param method description of the map projection parameters.
+ * @param parameters the parameters of the projection to be created.
+ * @param roles parameters to look for <cite>central meridian</cite>, <cite>scale factor</cite>,
+ * <cite>false easting</cite>, <cite>false northing</cite> and other values.
*/
protected NormalizedProjection(final OperationMethod method, final Parameters parameters,
final Map<ParameterRole, ? extends ParameterDescriptor<? extends Number>> roles)
@@ -415,12 +413,12 @@ public abstract class NormalizedProjecti
/**
* Creates a new normalized projection from the parameters computed by the given initializer.
*
- * @param initializer The initializer for computing map projection internal parameters.
+ * @param initializer the initializer for computing map projection internal parameters.
*/
NormalizedProjection(final Initializer initializer) {
context = initializer.context;
eccentricitySquared = initializer.eccentricitySquared.value;
- eccentricity = sqrt(eccentricitySquared); // DoubleDouble.sqrt() does not make any difference here.
+ eccentricity = sqrt(eccentricitySquared); // DoubleDouble.sqrt() does not make any difference here.
inverse = new Inverse();
}
@@ -447,9 +445,9 @@ public abstract class NormalizedProjecti
* fallback if the descriptor does not contain EPSG identifier, which should be rare. Usually, the regular
* expression will never be compiled.</div>
*
- * @param parameters The user-specified parameters.
- * @param regex The regular expression to use when using the operation name as the criterion.
- * @param identifier The identifier to compare against the operation method name.
+ * @param parameters the user-specified parameters.
+ * @param regex the regular expression to use when using the operation name as the criterion.
+ * @param identifier the identifier to compare against the operation method name.
* @return {@code true} if the name of the given operation method contains the given keyword
* or has an EPSG identifier equals to the given identifier.
*/
@@ -480,8 +478,8 @@ public abstract class NormalizedProjecti
* For example many subclasses will replace {@code this} by a specialized implementation if they detect that the
* ellipsoid is actually spherical.
*
- * @param factory The factory to use for creating the transform.
- * @return The map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
+ * @param factory the factory to use for creating the transform.
+ * @return the map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
* @throws FactoryException if an error occurred while creating a transform.
*
* @see ContextualParameters#completeTransform(MathTransformFactory, MathTransform)
@@ -504,9 +502,9 @@ public abstract class NormalizedProjecti
* It is caller's responsibility to choose an alternative method that can understand the parameters which were
* given to this original projection.
*
- * @param factory The factory given to {@link #createMapProjection(MathTransformFactory)}.
- * @param name The name of the alternative map projection to use.
- * @return The alternative projection.
+ * @param factory the factory given to {@link #createMapProjection(MathTransformFactory)}.
+ * @param name the name of the alternative map projection to use.
+ * @return the alternative projection.
* @throws FactoryException if an error occurred while creating the alternative projection.
*
* @since 0.7
@@ -535,7 +533,7 @@ public abstract class NormalizedProjecti
* Subclasses shall not use the values defined in the returned object for computation purpose,
* except at construction time.
*
- * @return The parameters values for the sequence of <cite>normalize</cite> \u2192 {@code this} \u2192 <cite>denormalize</cite>
+ * @return the parameters values for the sequence of <cite>normalize</cite> \u2192 {@code this} \u2192 <cite>denormalize</cite>
* transforms, or {@code null} if unspecified.
*/
@Override
@@ -556,7 +554,7 @@ public abstract class NormalizedProjecti
* Most GIS applications will instead be interested in the {@linkplain #getContextualParameters()
* contextual parameters}.</div>
*
- * @return A copy of the internal parameter values for this normalized projection.
+ * @return a copy of the internal parameter values for this normalized projection.
*/
@Debug
@Override
@@ -580,7 +578,7 @@ public abstract class NormalizedProjecti
* not for inspecting the {@linkplain #getContextualParameters() contextual parameters}.
* Inspecting the kernel parameter values is usually for debugging purpose only.</p>
*
- * @return A description of the internal parameters.
+ * @return a description of the internal parameters.
*/
@Debug
@Override
@@ -653,14 +651,14 @@ public abstract class NormalizedProjecti
* If this assumption is not applicable to a particular subclass, then it is implementor's responsibility to check
* the range.
*
- * @param srcPts The array containing the source point coordinate, as (<var>longitude</var>, <var>latitude</var>)
- * angles in <strong>radians</strong>.
- * @param srcOff The offset of the single coordinate to be converted in the source array.
- * @param dstPts The array into which the converted coordinate is returned (may be the same than {@code srcPts}).
- * Ordinates will be expressed in a dimensionless unit, as a linear distance on a unit sphere or ellipse.
- * @param dstOff The offset of the location of the converted coordinate that is stored in the destination array.
- * @param derivate {@code true} for computing the derivative, or {@code false} if not needed.
- * @return The matrix of the projection derivative at the given source position,
+ * @param srcPts the array containing the source point coordinate, as (<var>longitude</var>, <var>latitude</var>)
+ * angles in <strong>radians</strong>.
+ * @param srcOff the offset of the single coordinate to be converted in the source array.
+ * @param dstPts the array into which the converted coordinate is returned (may be the same than {@code srcPts}).
+ * Ordinates will be expressed in a dimensionless unit, as a linear distance on a unit sphere or ellipse.
+ * @param dstOff the offset of the location of the converted coordinate that is stored in the destination array.
+ * @param derivate {@code true} for computing the derivative, or {@code false} if not needed.
+ * @return the matrix of the projection derivative at the given source position,
* or {@code null} if the {@code derivate} argument is {@code false}.
* @throws ProjectionException if the coordinate can not be converted.
*/
@@ -683,11 +681,11 @@ public abstract class NormalizedProjecti
* <div class="note"><b>Note:</b> in <a href="http://trac.osgeo.org/proj/">Proj.4</a>, the same standardization,
* described above, is handled by {@code pj_inv.c}.</div>
*
- * @param srcPts The array containing the source point coordinate, as linear distance on a unit sphere or ellipse.
- * @param srcOff The offset of the point to be converted in the source array.
- * @param dstPts The array into which the converted point coordinate is returned (may be the same than {@code srcPts}).
- * Ordinates will be (<var>longitude</var>, <var>latitude</var>) angles in <strong>radians</strong>.
- * @param dstOff The offset of the location of the converted point that is stored in the destination array.
+ * @param srcPts the array containing the source point coordinate, as linear distance on a unit sphere or ellipse.
+ * @param srcOff the offset of the point to be converted in the source array.
+ * @param dstPts the array into which the converted point coordinate is returned (may be the same than {@code srcPts}).
+ * Ordinates will be (<var>longitude</var>, <var>latitude</var>) angles in <strong>radians</strong>.
+ * @param dstOff the offset of the location of the converted point that is stored in the destination array.
* @throws ProjectionException if the point can not be converted.
*/
protected abstract void inverseTransform(double[] srcPts, int srcOff, double[] dstPts, int dstOff)
@@ -698,7 +696,7 @@ public abstract class NormalizedProjecti
* Subclasses do not need to override this method, as they should override
* {@link #inverseTransform(double[], int, double[], int) inverseTransform(\u2026)} instead.
*
- * @return The inverse of this map projection.
+ * @return the inverse of this map projection.
*/
@Override
public MathTransform2D inverse() {
@@ -753,7 +751,7 @@ public abstract class NormalizedProjecti
/**
* Computes a hash code value for this {@code NormalizedProjection}.
*
- * @return The hash code value.
+ * @return the hash code value.
*/
@Override
protected int computeHashCode() {
@@ -784,8 +782,8 @@ public abstract class NormalizedProjecti
* equivalent allows the referencing module to transform coordinates between those two projections more efficiently.
* </div>
*
- * @param object The object to compare with this map projection for equivalence.
- * @param mode The strictness level of the comparison. Default to {@link ComparisonMode#STRICT}.
+ * @param object the object to compare with this map projection for equivalence.
+ * @param mode the strictness level of the comparison. Default to {@link ComparisonMode#STRICT}.
* @return {@code true} if the given object is equivalent to this map projection.
*/
@Override
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/ObliqueStereographic.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -418,10 +418,10 @@ public class ObliqueStereographic extend
final double sin\u03c6sin\u03c60 = sin\u03c6 * sin\u03c70;
final double cos\u03c6cos\u03c60 = cos\u03c6 * cos\u03c70;
final double cos\u03c6sin\u03bb = cos\u03c6 * sin\u03bb;
- final double B = 1 + sin\u03c6sin\u03c60 + cos\u03c6cos\u03c60*cos\u03bb; // Synder 21-4
+ final double B = 1 + sin\u03c6sin\u03c60 + cos\u03c6cos\u03c60*cos\u03bb; // Synder 21-4
if (dstPts != null) {
- dstPts[dstOff ] = cos\u03c6sin\u03bb / B; // Synder 21-2
- dstPts[dstOff+1] = (sin\u03c6*cos\u03c70 - cos\u03c6*sin\u03c70*cos\u03bb) / B; // Synder 21-3
+ dstPts[dstOff ] = cos\u03c6sin\u03bb / B; // Synder 21-2
+ dstPts[dstOff+1] = (sin\u03c6*cos\u03c70 - cos\u03c6*sin\u03c70*cos\u03bb) / B; // Synder 21-3
}
if (!derivate) {
return null;
Modified: sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java?rev=1779706&r1=1779705&r2=1779706&view=diff
==============================================================================
--- sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java [UTF-8] (original)
+++ sis/branches/JDK7/core/sis-referencing/src/main/java/org/apache/sis/referencing/operation/projection/PolarStereographic.java [UTF-8] Sat Jan 21 09:00:40 2017
@@ -102,8 +102,8 @@ public class PolarStereographic extends
* <li><cite>"Polar Stereographic (Variant C)"</cite>.</li>
* </ul>
*
- * @param method Description of the projection parameters.
- * @param parameters The parameter values of the projection to create.
+ * @param method description of the projection parameters.
+ * @param parameters the parameter values of the projection to create.
*/
public PolarStereographic(final OperationMethod method, final Parameters parameters) {
this(initializer(method, parameters));
@@ -261,8 +261,8 @@ public class PolarStereographic extends
* <p>The non-linear part of the returned transform will be {@code this} transform, except if the ellipsoid
* is spherical. In the later case, {@code this} transform will be replaced by a simplified implementation.</p>
*
- * @param factory The factory to use for creating the transform.
- * @return The map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
+ * @param factory the factory to use for creating the transform.
+ * @return the map projection from (\u03bb,\u03c6) to (<var>x</var>,<var>y</var>) coordinates.
* @throws FactoryException if an error occurred while creating a transform.
*/
@Override
@@ -278,7 +278,7 @@ public class PolarStereographic extends
* Converts the specified (\u03b8,\u03c6) coordinate (units in radians) and stores the result in {@code dstPts}.
* In addition, opportunistically computes the projection derivative if {@code derivate} is {@code true}.
*
- * @return The matrix of the projection derivative at the given source position,
+ * @return the matrix of the projection derivative at the given source position,
* or {@code null} if the {@code derivate} argument is {@code false}.
* @throws ProjectionException if the coordinate can not be converted.
*/
@@ -333,7 +333,7 @@ public class PolarStereographic extends
{
final double x = srcPts[srcOff ];
final double y = srcPts[srcOff+1];
- dstPts[dstOff ] = atan2(x, y); // Really (x,y), not (y,x)
+ dstPts[dstOff ] = atan2(x, y); // Really (x,y), not (y,x)
dstPts[dstOff+1] = -\u03c6(hypot(x, y));
}
@@ -358,7 +358,7 @@ public class PolarStereographic extends
/**
* Constructs a new map projection from the parameters of the given projection.
*
- * @param other The other projection (usually ellipsoidal) from which to copy the parameters.
+ * @param other the other projection (usually ellipsoidal) from which to copy the parameters.
*/
protected Spherical(final PolarStereographic other) {
super(other);
@@ -372,13 +372,13 @@ public class PolarStereographic extends
final double[] dstPts, final int dstOff,
final boolean derivate) throws ProjectionException
{
- final double \u03b8 = srcPts[srcOff ]; // \u03b8 = \u03bb - \u03bb\u2080
+ final double \u03b8 = srcPts[srcOff ]; // \u03b8 = \u03bb - \u03bb\u2080
final double \u03c6 = srcPts[srcOff+1];
final double sin\u03b8 = sin(\u03b8);
final double cos\u03b8 = cos(\u03b8);
final double t = tan(PI/4 + 0.5*\u03c6);
- final double x = t * sin\u03b8; // Synder 21-5
- final double y = t * cos\u03b8; // Synder 21-6
+ final double x = t * sin\u03b8; // Synder 21-5
+ final double y = t * cos\u03b8; // Synder 21-6
if (dstPts != null) {
dstPts[dstOff ] = x;
dstPts[dstOff+1] = y;
@@ -387,8 +387,8 @@ public class PolarStereographic extends
return null;
}
final double dt = t / cos(\u03c6);
- return new Matrix2(y, dt*sin\u03b8, // \u2202x/\u2202\u03bb , \u2202x/\u2202\u03c6
- -x, dt*cos\u03b8); // \u2202y/\u2202\u03bb , \u2202y/\u2202\u03c6
+ return new Matrix2(y, dt*sin\u03b8, // \u2202x/\u2202\u03bb , \u2202x/\u2202\u03c6
+ -x, dt*cos\u03b8); // \u2202y/\u2202\u03bb , \u2202y/\u2202\u03c6
}
/**