org.opensourcephysics.sip.ch12
Class Clusters

java.lang.Object
  extended by org.opensourcephysics.sip.ch12.Clusters

public class Clusters
extends java.lang.Object

Clusters implements the Newman-Ziff algorithm for identifying clusters.


Field Summary
 int L
           
 int N
           
 int[] numClusters
           
 int numSitesOccupied
           
 
Constructor Summary
Clusters(int L)
           
 
Method Summary
 void addRandomSite()
           
 int getClusterSize(int s)
           
 double getMeanClusterSize()
           
 int getSpanningClusterSize()
           
 void newLattice()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

L

public int L

N

public int N

numSitesOccupied

public int numSitesOccupied

numClusters

public int[] numClusters
Constructor Detail

Clusters

public Clusters(int L)
Method Detail

newLattice

public void newLattice()

addRandomSite

public void addRandomSite()

getClusterSize

public int getClusterSize(int s)

getSpanningClusterSize

public int getSpanningClusterSize()

getMeanClusterSize

public double getMeanClusterSize()