Class SimpleScalarEnvironment

java.lang.Object
  extended by SimpleScalarEnvironment
All Implemented Interfaces:
IEnvironment

public class SimpleScalarEnvironment
extends java.lang.Object
implements IEnvironment

2d box with no scalar fields of a fixed (at construction time) width and height

Since:
1.0

Constructor Summary
SimpleScalarEnvironment()
           
SimpleScalarEnvironment(double[] arrLfMin, double[] arrLfMax, boolean bAddDflt)
           
SimpleScalarEnvironment(double lfWidth, double lfHeight, boolean bAddDefault)
           
SimpleScalarEnvironment(SimpleScalarEnvironment src)
           
 
Method Summary
 IBoundary getBoundary()
          Gets boundary interface
 int getDimensionality()
          dimensionality of space in which environment is embedded
 double getFieldVal(int nWhichField, double[] arrLoc)
          Gets a particular field value at a particular location Invalid for this class Figure out how to declare exceptions in interface definitions
 double[] getFieldVals(double[] arrLoc)
          Gets all field values for a particular location as a vector Invalid for this class Figure out how to declare exceptions in interface definitions
 double[] getGradient(int nWhichField, double[] arrLoc)
          Gradient at a particular location for a given field
 void getGradient(int nWhichField, double[] arrLoc, double[] arrRslt)
          Gradient at a particular location for a given field
 int getNumScalars()
          number of scalar fields over environment
 void initializeVars(double[] arrLfMin, double[] arrLfMax, boolean bAddDflt)
           
 void initializeVars(double lfWidth, double lfHeight, boolean bAddDefault)
           
 IEnvironment makeCopy()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleScalarEnvironment

public SimpleScalarEnvironment()

SimpleScalarEnvironment

public SimpleScalarEnvironment(double lfWidth,
                               double lfHeight,
                               boolean bAddDefault)

SimpleScalarEnvironment

public SimpleScalarEnvironment(double[] arrLfMin,
                               double[] arrLfMax,
                               boolean bAddDflt)

SimpleScalarEnvironment

public SimpleScalarEnvironment(SimpleScalarEnvironment src)
Method Detail

initializeVars

public void initializeVars(double lfWidth,
                           double lfHeight,
                           boolean bAddDefault)

initializeVars

public void initializeVars(double[] arrLfMin,
                           double[] arrLfMax,
                           boolean bAddDflt)

getGradient

public double[] getGradient(int nWhichField,
                            double[] arrLoc)
Gradient at a particular location for a given field

Specified by:
getGradient in interface IEnvironment
Parameters:
nWhichField - field to take gradient of
arrLoc - place at which to take gradient
Returns:
gradient (of proper dimensionality) as a double []

getGradient

public void getGradient(int nWhichField,
                        double[] arrLoc,
                        double[] arrRslt)
Gradient at a particular location for a given field

Specified by:
getGradient in interface IEnvironment
Parameters:
nWhichField - field to take gradient of
arrLoc - place at which to take gradient
arrRslt - gradient (of proper dimensionality) as a double []

getDimensionality

public int getDimensionality()
dimensionality of space in which environment is embedded

Specified by:
getDimensionality in interface IEnvironment

getNumScalars

public int getNumScalars()
number of scalar fields over environment

Specified by:
getNumScalars in interface IEnvironment

getFieldVal

public double getFieldVal(int nWhichField,
                          double[] arrLoc)
Gets a particular field value at a particular location Invalid for this class Figure out how to declare exceptions in interface definitions

Specified by:
getFieldVal in interface IEnvironment

getFieldVals

public double[] getFieldVals(double[] arrLoc)
Gets all field values for a particular location as a vector Invalid for this class Figure out how to declare exceptions in interface definitions

Specified by:
getFieldVals in interface IEnvironment
Parameters:
arrLoc - invalid for this class
Returns:
null -- invalid for this class

makeCopy

public IEnvironment makeCopy()
Specified by:
makeCopy in interface IEnvironment

getBoundary

public IBoundary getBoundary()
Gets boundary interface

Specified by:
getBoundary in interface IEnvironment