volatileprototypes.fvlib
Class BehaviorChargePair

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

public final class BehaviorChargePair
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
BehaviorChargePair()
          Constructor, generates a new class instance.
BehaviorChargePair(java.util.ArrayList<? extends Point> pointsin0, java.util.ArrayList<? extends Point> pointsin1)
          Constructor.
BehaviorChargePair(Point[] pointsin0, Point[] pointsin1)
          Constructor.
 
Method Summary
 float getBias()
          Get the bias value.
 float getFMult()
          Get the current force multiplier value.
protected  int getNumCPUs()
           
 Point[] getP2()
          Get the current 2nd point array.
 BehaviorChargePair setBias(float biasin)
          Sets the bias.
 BehaviorChargePair setFMult(float fmultin)
          Sets the force multiplier.
 BehaviorChargePair setInv(boolean invin)
          Sets whether force should be inverted.
 BehaviorChargePair setP(java.util.ArrayList<? extends Point> pointsin0, java.util.ArrayList<? extends Point> pointsin1)
          Sets the object's Point arrays using copies of the supplied ArrayLists.
 BehaviorChargePair setP(Point[] pointsin0, Point[] pointsin1)
          Sets the object's Point arrays using the supplied arrays.
 BehaviorChargePair setP2(java.util.ArrayList<? extends Point> pointsin)
          Sets the object's 2nd Point array using a copy of the supplied ArrayList.
 BehaviorChargePair setP2(Point[] pointsin)
          Sets the object's 2nd Point array using the supplied array.
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

BehaviorChargePair

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


BehaviorChargePair

public BehaviorChargePair(java.util.ArrayList<? extends Point> pointsin0,
                          java.util.ArrayList<? extends Point> pointsin1)
Constructor. Constructor, generates a new class instance using copies of the supplied Point ArrayLists.

Parameters:
pointsin0 - An ArrayList containing Point objects with which the object's 1st list will be initialized.
pointsin1 - An ArrayList containing Point objects with which the object's 2nd list will be initialized.

BehaviorChargePair

public BehaviorChargePair(Point[] pointsin0,
                          Point[] pointsin1)
Constructor. Constructor, generates a new class instance using the supplied arrays.

Parameters:
pointsin0 - An array containing Point objects with which the object's 1st list will be initialized.
pointsin1 - An array containing Point objects with which the object's 2nd list will be initialized.
Method Detail

getNumCPUs

protected int getNumCPUs()
Overrides:
getNumCPUs in class Solver

setP

public BehaviorChargePair setP(java.util.ArrayList<? extends Point> pointsin0,
                               java.util.ArrayList<? extends Point> pointsin1)
Sets the object's Point arrays using copies of the supplied ArrayLists.

Parameters:
pointsin0 - The 1st ArrayList containing Point objects.
pointsin1 - The 2nd ArrayList containing Point objects.
Returns:
The current object.

setP

public BehaviorChargePair setP(Point[] pointsin0,
                               Point[] pointsin1)
Sets the object's Point arrays using the supplied arrays.

Parameters:
pointsin0 - The 1st array containing Point objects.
pointsin1 - The 2nd array containing Point objects.
Returns:
The current object.

setP2

public BehaviorChargePair setP2(Point[] pointsin)
Sets the object's 2nd Point array using the supplied array.

Parameters:
pointsin - The array containing Point objects.
Returns:
The current object.

setP2

public BehaviorChargePair setP2(java.util.ArrayList<? extends Point> pointsin)
Sets the object's 2nd Point array using a copy of the supplied ArrayList.

Parameters:
pointsin - The ArrayList containing Point objects.
Returns:
The current object.

setBias

public BehaviorChargePair 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 BehaviorChargePair 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 BehaviorChargePair setFMult(float fmultin)
Sets the force multiplier.

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

getP2

public Point[] getP2()
Get the current 2nd point array.

Returns:
The current 2nd point array.

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