public class Lattice
extends java.lang.Object
implements java.lang.Cloneable
Modifier and Type | Field and Description |
---|---|
static double |
EPS |
static java.text.NumberFormat |
fmt |
Constructor and Description |
---|
Lattice(java.lang.String name)
Creates an empty lattice with a 'name' and a 'base=0' position
|
Lattice(java.lang.String name,
double base)
Creates an empty lattice with a 'name' and a 'base' position.
|
Lattice(java.lang.String name,
java.lang.Double base)
Creates an empty lattice with a 'name' and a 'base' position
|
Modifier and Type | Method and Description |
---|---|
void |
clearMarkers()
Remove all non permanent marker elements from the lattice.
|
java.lang.Object |
clone()
Clone a lattice.
|
double |
getBase()
Return the lattice base position.
|
Element |
getItem(int index)
Get element at 'index' from lattice.
|
org.w3c.dom.Document |
getLatticeAsDocument()
Return the lattice as a DOM document object.
|
double |
getLength()
Return the lattice length in distance units.
|
java.lang.String |
getName()
Return the name property.
|
Node2ElementMapper |
getNode2ElementMapper()
Getter for the forward dictionary property: [(key,value)=(node,element)]
|
void |
joinDrifts()
Join neighbouring drift spaces into a single one.
|
LatticeIterator |
latticeIterator()
Return an iterator for the Lattice.
|
int |
len()
Return the lattice length in number of elements.
|
Node2ElementMapper |
makeNode2ElementMapper()
Make a new forward dictionary: [(key,value)=(node,element)].
|
void |
setBase(double base)
Set the lattice base position.
|
void |
setName(java.lang.String name)
Set the lattice name property.
|
void |
setNode2ElementMapper(Node2ElementMapper node2ElementMap)
Setter for the forward dictionary property: [(key,value)=(node,element)]
|
static java.lang.String |
version()
Return a version string w/o the cvs keyword (i.e.
|
public Lattice(java.lang.String name, double base)
name
- the lattice name.base
- the lattice base position.public Lattice(java.lang.String name, java.lang.Double base)
public Lattice(java.lang.String name)
public double getBase()
public void setBase(double base)
public java.lang.Object clone()
clone
in class java.lang.Object
public int len()
public Element getItem(int index)
public double getLength()
public void setName(java.lang.String name)
public java.lang.String getName()
public void setNode2ElementMapper(Node2ElementMapper node2ElementMap)
public Node2ElementMapper getNode2ElementMapper()
public Node2ElementMapper makeNode2ElementMapper()
public void clearMarkers()
public void joinDrifts()
public static java.lang.String version()
public LatticeIterator latticeIterator()
public org.w3c.dom.Document getLatticeAsDocument()