pal.misc
Class Utils

java.lang.Object
  |
  +--pal.misc.Utils

public class Utils
extends java.lang.Object

Provides some miscellaneous methods.


Constructor Summary
Utils()
           
 
Method Summary
static MultivariateFunction combineMultivariateFunction(MultivariateFunction base, Parameterized[] additionalParameters)
          Creates an interface between a parameterised object to allow it to act as a multivariate minimum.
static void copy(double[][] source, double[][] dest)
          Copies all of source into dest - assumes dest to be large enough
static double[] getCopy(double[] array)
          Clones an array of doubles
static double[][] getCopy(double[][] array)
          Clones an array of doubles
static int[] getCopy(int[] array)
          Clones an array of ints
static java.lang.String toString(double[] array)
          A simple toString method for an array of doubles.
static java.lang.String toString(double[][] array)
          A simple toString method for an array of doubles.
static java.lang.String toString(int[] array)
          A simple toString method for an array of ints.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utils

public Utils()
Method Detail

getCopy

public static final double[] getCopy(double[] array)
Clones an array of doubles
Returns:
null if input is null, otherwise return complete copy.

getCopy

public static final double[][] getCopy(double[][] array)
Clones an array of doubles
Returns:
null if input is null, otherwise return complete copy.

getCopy

public static final int[] getCopy(int[] array)
Clones an array of ints
Returns:
null if input is null, otherwise return complete copy.

copy

public static final void copy(double[][] source,
                              double[][] dest)
Copies all of source into dest - assumes dest to be large enough

toString

public static final java.lang.String toString(double[] array)
A simple toString method for an array of doubles. No fancy formating. Puts spaces between each value

toString

public static final java.lang.String toString(int[] array)
A simple toString method for an array of ints. No fancy formating. Puts spaces between each value

toString

public static final java.lang.String toString(double[][] array)
A simple toString method for an array of doubles. No fancy formating. Puts spaces between each value

combineMultivariateFunction

public static final MultivariateFunction combineMultivariateFunction(MultivariateFunction base,
                                                                     Parameterized[] additionalParameters)
Creates an interface between a parameterised object to allow it to act as a multivariate minimum.