Class edu.cornell.lassp.mck10.Hysteresis.Avalanche
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class edu.cornell.lassp.mck10.Hysteresis.Avalanche

java.lang.Object
   |
   +----edu.cornell.lassp.mck10.Hysteresis.Avalanche

public class Avalanche
extends Object
The class 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.

Version:
1.0
Author:
Matt Kuntz
(e-mail: mck10@cornell.edu)

Variable Index

 o complete
 o direction
 o externalField
 o length
 o size
 o spins

Constructor Index

 o Avalanche(double, byte)
Avalanche(double externalField, byte direction) creates an Avalanche data structure with the external field and the direction set.

Method Index

 o add(SpinFlip)
add(SpinFlip spin) is used to add a new spin to the avalanche.
 o clear(double, byte)
 o getDirection()
getDirection() returns the direction the spins flipped to.
 o getExternalField()
getExternalField() returns the field at which the avalanche flipped.
 o getSize()
getSize() returns the size of the avalanche.
 o getSpin(int)
getSpin(int num) returns spin number num

Variables

 o spins
  protected SpinFlip spins[]
 o size
  protected int size
 o length
  protected int length
 o externalField
  protected double externalField
 o direction
  protected byte direction
 o complete
  public boolean complete

Constructors

 o Avalanche
  public Avalanche(double externalField,
                   byte direction)
Avalanche(double externalField, byte direction) creates an Avalanche data structure with the external field and the direction set.

Methods

 o clear
  protected void clear(double externalField,
                       byte direction)
 o add
  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.
Parameters:
spin - The spin to be added.
 o getSize
  public int getSize()
getSize() returns the size of the avalanche.
Returns:
The size of the avalanche.
 o getSpin
  public SpinFlip getSpin(int num)
getSpin(int num) returns spin number num
Parameters:
num - The index of the spin to be returned.
Returns:
The spin at position num
 o getExternalField
  public double getExternalField()
getExternalField() returns the field at which the avalanche flipped.
Returns:
The field at which the avalanche flipped.
 o getDirection
  public byte getDirection()
getDirection() returns the direction the spins flipped to.
Returns:
The direction the spins flipped to.

All Packages  Class Hierarchy  This Package  Previous  Next  Index