org.simbrain.gauge.core
Class Gauge

java.lang.Object
  extended by org.simbrain.gauge.core.Gauge

public class Gauge
extends Object

Gauge is the main class of the high dimensional visualizer, which provides methods for changing and initializing various projection algorithms.


Field Summary
static String[] PROJECTOR_LIST
          List of available projection algorithms.
 
Constructor Summary
Gauge()
          Default constructor for gauge.
 
Method Summary
 void addDatapoint(double[] point)
          Add a new point to the dataset, using the currently selected add method.
 Projector getCurrentProjector()
           
 Projector getCurrentProjectorC()
           
 String getDefaultProjector()
           
 Dataset getDownstairs()
          Convenience method to get downstairs dataset.
 double getError()
          Returns error, which is only set by some projection functions.
 GaugedVariables getGaugedVars()
           
 Projector getProjectorByName(String name)
           
static String[] getProjectorList()
           
 Dataset getUpstairs()
          Convenience method to get upstairs dataset.
 void init(int dims)
          Initialize gauge to accept data of a specified dimension.
 boolean isOn()
          If the gauge is on it should actively represent changing states of the network.
 void iterate(int numTimes)
          Iterate the dataset some fixed number of times.
 void openHighDDataset(File file)
          Opens a high demension dataset.
 void setCurrentProjector(Projector proj)
           
 void setCurrentProjector(String proj)
           
 void setCurrentProjectorC(Projector proj)
          Used by Castor.
 void setDefaultProjector(String defaultProjector)
           
 void setGaugedVars(GaugedVariables gaugedVars)
          Sets the gauged variables.
 void setOn(boolean b)
          Turn the gauge on and off; i.e., allow new data or not.
 void updateProjector()
          Update the projector; used when loading a dataset or changing projection methods.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROJECTOR_LIST

public static final String[] PROJECTOR_LIST
List of available projection algorithms.

Constructor Detail

Gauge

public Gauge()
Default constructor for gauge.

Method Detail

updateProjector

public void updateProjector()
Update the projector; used when loading a dataset or changing projection methods.


init

public void init(int dims)
Initialize gauge to accept data of a specified dimension.

Parameters:
dims - dimensionality of the high dimensional dataset

openHighDDataset

public void openHighDDataset(File file)
Opens a high demension dataset.

Parameters:
file - file of high dimension dataset to open

addDatapoint

public void addDatapoint(double[] point)
Add a new point to the dataset, using the currently selected add method.

Parameters:
point - the point to add

iterate

public void iterate(int numTimes)
Iterate the dataset some fixed number of times.

Parameters:
numTimes - Number of times to iterate the gauge

getProjectorList

public static String[] getProjectorList()
Returns:
list of projector types, by name

setCurrentProjector

public void setCurrentProjector(String proj)
Parameters:
proj - the name of the projection algorithm to switch to

getProjectorByName

public Projector getProjectorByName(String name)
Parameters:
name - name of projector
Returns:
Projector type by name.

getCurrentProjectorC

public Projector getCurrentProjectorC()
Returns:
current projector

setCurrentProjectorC

public void setCurrentProjectorC(Projector proj)
Used by Castor.

Parameters:
proj - current projector

setCurrentProjector

public void setCurrentProjector(Projector proj)
Parameters:
proj - the new projection algorithm

getCurrentProjector

public Projector getCurrentProjector()
Returns:
the current projection algorithm

getUpstairs

public Dataset getUpstairs()
Convenience method to get upstairs dataset.

Returns:
hi-dimensional dataset associated with current projector

getDownstairs

public Dataset getDownstairs()
Convenience method to get downstairs dataset.

Returns:
low-dimensional dataset associated with current projector

getError

public double getError()
Returns error, which is only set by some projection functions.

Returns:
current error

isOn

public boolean isOn()
If the gauge is on it should actively represent changing states of the network.

Returns:
true if the gauge is on

setOn

public void setOn(boolean b)
Turn the gauge on and off; i.e., allow new data or not. Used mainly when the Gauge is a component in another application.

Parameters:
b - boolean value to update gauge

getGaugedVars

public GaugedVariables getGaugedVars()
Returns:
gauged variables

setGaugedVars

public void setGaugedVars(GaugedVariables gaugedVars)
Sets the gauged variables.

Parameters:
gaugedVars - variables to use in gauge

getDefaultProjector

public String getDefaultProjector()
Returns:
Returns the defaultProjector.

setDefaultProjector

public void setDefaultProjector(String defaultProjector)
Parameters:
defaultProjector - The defaultProjector to set.