All Packages Class Hierarchy This Package Previous Next Index
java.lang.Object | +----edu.cornell.lassp.mck10.Hysteresis.Avalanche
Avalanche is used to store data about an avalanche
of spins. The Avalanche class stores the list of spins
and the size of the avalanche. The spins are stored in
SpinFlip classes, which contain the coordinates of the spin,
and the level at which they flipped.
Source Code is available.
Avalanche(double externalField, byte direction)
creates an Avalanche data structure with the external
field and the direction set.
add(SpinFlip spin) is used to add a new spin to the
avalanche.
getDirection() returns the direction the spins flipped
to.
getExternalField() returns the field at which the
avalanche flipped.
getSize() returns the size of the avalanche.
getSpin(int num) returns spin number num
protected SpinFlip spins[]
protected int size
protected int length
protected double externalField
protected byte direction
public boolean complete
public Avalanche(double externalField,
byte direction)
Avalanche(double externalField, byte direction)
creates an Avalanche data structure with the external
field and the direction set.
protected void clear(double externalField,
byte direction)
public void add(SpinFlip spin)
add(SpinFlip spin) is used to add a new spin to the
avalanche. If the avalanche is too big, a new array is allocated
with more space before the spin is added.
public int getSize()
getSize() returns the size of the avalanche.
public SpinFlip getSpin(int num)
getSpin(int num) returns spin number num
num
public double getExternalField()
getExternalField() returns the field at which the
avalanche flipped.
public byte getDirection()
getDirection() returns the direction the spins flipped
to.
All Packages Class Hierarchy This Package Previous Next Index