forcefield
Class DenseExclusions
java.lang.Object
forcefield.DenseExclusions
- public class DenseExclusions
- extends java.lang.Object
meant for storing the exclusions of the particles (atoms) in the system.
exclusions are represented via a bool[]. i.e. this is suitable for small
systems with lots of exclusions, a densely populated system.
- Since:
- 0.1
- Version:
- 0.1, November 2002
- Author:
- Mika Kastenholz, Vincent Kraeutler
|
Method Summary |
boolean |
get(int i,
int j)
get an exclusions |
private int |
index(int i,
int j)
|
void |
put(int i,
int j,
boolean status)
set an exclusion |
int |
size()
|
int |
types()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
types
private final int types
store
private boolean[] store
length
private final int length
DenseExclusions
public DenseExclusions(int i,
int j)
- typically i == j
- Parameters:
i - number of atoms with exclusionsj - number of atoms that may be excluded
put
public final void put(int i,
int j,
boolean status)
- set an exclusion
- Parameters:
i - j - status - is j excluded by i?
get
public final boolean get(int i,
int j)
- get an exclusions
- Parameters:
i - j -
- Returns:
- is j excluded by i?
size
public final int size()
- Returns:
- the number of pairs (i.e. maximum number of exclusions)
types
public final int types()
- Returns:
- the number of excluding atoms
index
private final int index(int i,
int j)
- Parameters:
i - j -
- Returns:
- the index of exclusion (i, j)