Fix typo and avoid computing an unused element.

git-svn-id: https://svn.apache.org/repos/asf/commons/proper/math/trunk@1443364 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Luc Maisonobe 2013-02-07 09:28:04 +00:00
parent 23083ae26e
commit 3e53d40794
1 changed files with 5 additions and 5 deletions

View File

@ -64,10 +64,10 @@ public class SphericalCoordinates implements Serializable {
/** Azimuthal angle in the x-y plane θ. */
private final double theta;
/** Polar angle (co-latitude) φ. */
/** Polar angle (co-latitude) Φ. */
private final double phi;
/** Jacobian of (r, θ &phi). */
/** Jacobian of (r, θ &Phi). */
private double[][] jacobian;
/** Hessian of radius. */
@ -96,7 +96,7 @@ public class SphericalCoordinates implements Serializable {
/** Build a spherical coordinates transformer from spherical coordinates.
* @param r radius
* @param theta azimuthal angle in x-y place
* @param theta azimuthal angle in x-y plane
* @param phi polar (co-latitude) angle
*/
public SphericalCoordinates(final double r, final double theta, final double phi) {
@ -188,7 +188,7 @@ public class SphericalCoordinates implements Serializable {
* @param sGradient gradient with respect to spherical coordinates
* {df/dr, df/dθ, df/dΦ}
* @return Hessian with respect to Cartesian coordinates
* {{d<sup>2</sup>f/dx<sup>2</sup>, d<sup>2</sup>f/rGradient.getY(), d<sup>2</sup>f/dxdz},
* {{d<sup>2</sup>f/dx<sup>2</sup>, d<sup>2</sup>f/dxdy, d<sup>2</sup>f/dxdz},
* {d<sup>2</sup>f/dxdy, d<sup>2</sup>f/dy<sup>2</sup>, d<sup>2</sup>f/dydz},
* {d<sup>2</sup>f/dxdz, d<sup>2</sup>f/dydz, d<sup>2</sup>f/dz<sup>2</sup>}}
*/
@ -210,7 +210,7 @@ public class SphericalCoordinates implements Serializable {
hj[0][2] = sHessian[0][0] * jacobian[0][2] + sHessian[2][0] * jacobian[2][2];
hj[1][0] = sHessian[1][0] * jacobian[0][0] + sHessian[1][1] * jacobian[1][0] + sHessian[2][1] * jacobian[2][0];
hj[1][1] = sHessian[1][0] * jacobian[0][1] + sHessian[1][1] * jacobian[1][1] + sHessian[2][1] * jacobian[2][1];
hj[1][2] = sHessian[1][0] * jacobian[0][2] + sHessian[2][1] * jacobian[2][2];
// don't compute hj[1][2] as it is not used below
hj[2][0] = sHessian[2][0] * jacobian[0][0] + sHessian[2][1] * jacobian[1][0] + sHessian[2][2] * jacobian[2][0];
hj[2][1] = sHessian[2][0] * jacobian[0][1] + sHessian[2][1] * jacobian[1][1] + sHessian[2][2] * jacobian[2][1];
hj[2][2] = sHessian[2][0] * jacobian[0][2] + sHessian[2][2] * jacobian[2][2];