/** *
* Interface for environments for robots. * *
* @author Michael Schuresko * @version %I%, %G% * @since 1.0 */ public interface IEnvironment { /** * dimensionality of space in which environment is embedded */ public int getDimensionality(); /** * number of scalar fields over environment */ public int getNumScalars(); /** * Gets a particular field value at a particular location */ public double getFieldVal(int nWhichField, double arrLoc[]); /** * Gets all field values for a particular location as a vector * @param arrLoc array of location at which measurement is taken * @return array containing field values at arrLoc */ public double [] getFieldVals(double arrLoc[]); /** * Gradient at a particular location for a given field * @param nWhichField field to take gradient of * @param arrLoc place at which to take gradient * @return gradient (of proper dimensionality) as a double [] */ public double [] getGradient(int nWhichField, double arrLoc[]); /** * Gradient at a particular location for a given field * @param nWhichField field to take gradient of * @param arrLoc place at which to take gradient * @param arrRslt gradient (of proper dimensionality) as a double [] */ public void getGradient(int nWhichField, double arrLoc[], double arrRslt[]); /** * Gets boundary interface */ public IBoundary getBoundary(); public IEnvironment makeCopy(); }