edu.ucla.util
Class DblArrays

Object
  extended by DblArrays

public class DblArrays
extends Object

A class consisting of static utility functions dealing with double arrays.


Constructor Summary
DblArrays()
           
 
Method Summary
static double[] add(double[] a, double[] b)
           
static String convertToString(double[] values)
           
static double dotProduct(double[] a, double[] b)
           
static void index(double[] values)
          Sets values[i]=i for all indices.
static double[] index(int size)
          returns an array of length size where result[i]=i.
static double max(double[] a)
           
static double min(double[] a)
           
static double[] multiply(double[] a, double k)
           
static void print(double[] values, PrintStream stream)
          displays the double array on System.stream
static void println(double[] values, PrintStream stream)
          displays the double array on System.stream
static void shuffle(double[] values)
          Will shuffle the values in the double array.
static double[] subtract(double[] a, double[] b)
           
 
Methods inherited from class Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DblArrays

public DblArrays()
Method Detail

index

public static void index(double[] values)
Sets values[i]=i for all indices.


index

public static double[] index(int size)
returns an array of length size where result[i]=i.


convertToString

public static String convertToString(double[] values)

print

public static void print(double[] values,
                         PrintStream stream)
displays the double array on System.stream


println

public static void println(double[] values,
                           PrintStream stream)
displays the double array on System.stream


shuffle

public static void shuffle(double[] values)
Will shuffle the values in the double array. See Collections.shuffle for a description of the algorithm.


multiply

public static double[] multiply(double[] a,
                                double k)

subtract

public static double[] subtract(double[] a,
                                double[] b)

add

public static double[] add(double[] a,
                           double[] b)

dotProduct

public static double dotProduct(double[] a,
                                double[] b)

max

public static double max(double[] a)

min

public static double min(double[] a)


Copyright 2010 UCLA Automated Reasoning Group