public class PDList
extends java.lang.Object
Constructor and Description |
---|
PDList()
Constructs a PDList object with a default threshold of zero, which means
that all added PDs remain in the list.
|
PDList(double dpt)
Constructs a PDList object given a threshold for the difference of dot
products from 1 below which PDs are considered the same.
|
Modifier and Type | Method and Description |
---|---|
void |
addPD(PD p)
Adds the new PD to the list provided the list does not already contain an
entry close to the new PD.
|
boolean |
equivalent(PDList pd,
double thresh)
Compares this PDList to another to see if they are the same to within the
specified tolerance on the dot product between unit vectors.
|
int |
getNoPDs()
Returns the number of principal directions stored.
|
PD |
getPD(int i)
Returns the i-th PD in the list.
|
double |
getPropSum()
Returns the sum of the strengths of all the pds in the list.
|
boolean |
isIn(PD p)
Tests to see if the PD is already in the list to within the specified
threshold.
|
void |
prune(double thresh)
Prunes from the list of PDs all of those whose strength is less than the
specified fraction of the sum of the strengths of all the PDs in the
list.
|
void |
pruneByValue(double thresh)
Prunes from the list of PDs by removing all those with value less than
the threshold.
|
public PDList(double dpt)
public PDList()
public void addPD(PD p)
public boolean isIn(PD p)
public PD getPD(int i)
public int getNoPDs()
public void prune(double thresh)
public void pruneByValue(double thresh)
public double getPropSum()
public boolean equivalent(PDList pd, double thresh)
pd
- The other PDList to compare.thresh
- The threshold on the dot product between two unit vectors
above which they are considered equivalent.