Package PamUtils

Class CoordUtils

java.lang.Object
PamUtils.CoordUtils

public class CoordUtils extends Object
Author:
David J McLaren
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static double
    dist(double[] a, double[] b)
    Given two N-element vectors representing positions, return the distance between them.
    static double
    dist(double[] a, double[] b, int n)
    Given two N-element vectors representing positions, return the distance between them.
    static double
    Given two Coordinate3d objects, return the distance between them.
    static double
    sumSquared(double[] x)
    Find the sum of squares of a vector.

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • CoordUtils

      public CoordUtils()
  • Method Details

    • Pam3dRangeCalc

      public static double Pam3dRangeCalc(Coordinate3d a, Coordinate3d b)
      Given two Coordinate3d objects, return the distance between them.
    • dist

      public static double dist(double[] a, double[] b)
      Given two N-element vectors representing positions, return the distance between them. This is just the L2-norm of the two vectors. see See also CoordUtils.norm().
    • dist

      public static double dist(double[] a, double[] b, int n)
      Given two N-element vectors representing positions, return the distance between them. This is just the L2-norm of the two vectors. This one differs from the one above in the N is specified explicitly.

      see See also CoordUtils.norm().

      author Dave Mellinger

    • sumSquared

      public static double sumSquared(double[] x)
      Find the sum of squares of a vector.

      see See also CoordUtils.dist().

      author Dave Mellinger