volatileprototypes.fvlib
Class BehaviorCharge

java.lang.Object
  extended by volatileprototypes.fvlib.Solver
      extended by volatileprototypes.fvlib.Behavior
          extended by volatileprototypes.fvlib.BehaviorCharge

public final class BehaviorCharge
extends Behavior

Since:
0.4.0

Nested Class Summary
 
Nested classes/interfaces inherited from class volatileprototypes.fvlib.Solver
Solver.Caller
 
Field Summary
 
Fields inherited from class volatileprototypes.fvlib.Behavior
points
 
Fields inherited from class volatileprototypes.fvlib.Solver
xs
 
Constructor Summary
BehaviorCharge()
          Constructor, generates a new class instance.
BehaviorCharge(java.util.ArrayList<? extends Point> pointsin)
          Constructor, generates a new class instance using a copy of the supplied Point ArrayList.
BehaviorCharge(Point[] pointsin)
          Constructor.
 
Method Summary
 float getBias()
          Get the bias value.
 float getFMult()
          Get the current force multiplier value.
protected  int getNumCPUs()
           
 BehaviorCharge setBias(float biasin)
          Sets the bias.
 BehaviorCharge setFMult(float fmultin)
          Sets the force multiplier.
 BehaviorCharge setInv(boolean invin)
          Sets whether force should be inverted.
protected  void stepFunction(int step, int offset)
           
 
Methods inherited from class volatileprototypes.fvlib.Behavior
getP, setP, setP
 
Methods inherited from class volatileprototypes.fvlib.Solver
finalizeFunction, step
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BehaviorCharge

public BehaviorCharge()
Constructor, generates a new class instance.


BehaviorCharge

public BehaviorCharge(java.util.ArrayList<? extends Point> pointsin)
Constructor, generates a new class instance using a copy of the supplied Point ArrayList.

Parameters:
pointsin - An ArrayList containing Point objects with which the object's list will be initialized.

BehaviorCharge

public BehaviorCharge(Point[] pointsin)
Constructor. Constructor, generates a new class instance using the supplied array.

Parameters:
pointsin - An array containing Point objects with which the object's list will be initialized.
Method Detail

getNumCPUs

protected int getNumCPUs()
Overrides:
getNumCPUs in class Solver

setBias

public BehaviorCharge setBias(float biasin)
Sets the bias. Bias limits the maximum force (at zero distance).

Parameters:
biasin - A float representing the new bias value.
Returns:
The current object.

setInv

public BehaviorCharge setInv(boolean invin)
Sets whether force should be inverted. By default same charges repel.

Parameters:
invin - A bool representing the new invert value.
Returns:
The current object.

setFMult

public BehaviorCharge setFMult(float fmultin)
Sets the force multiplier.

Parameters:
fmultin - A float representing the new force multiplier.
Returns:
The current object.

getBias

public float getBias()
Get the bias value.

Returns:
The current bias value.

getFMult

public float getFMult()
Get the current force multiplier value.

Returns:
The current force multiplier value.

stepFunction

protected final void stepFunction(int step,
                                  int offset)
Overrides:
stepFunction in class Solver