|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||
java.lang.Object
|
+--java.util.AbstractCollection
|
+--java.util.AbstractList
|
+--java.util.Vector
|
+--jumbo.euclid.EuclidVector
|
+--jumbo.euclid.Point3Vector
Point3Vector - a (Java) Vector of Point3s. (Note that 'Vector' is used by Java to describe an array of objects - there is no relationship to geometrical vectors in this package.)
There are a large number of routines for manipulating 3-D coordinates. Examples are distance, torsion, angle, planes, fitting, etc. The routines have NOT been optimised. In the previous incarnation (C++) all coordinates were handled by Point3s, etc because pointers are fragile. In Java, however, a lot more intermediate information could be passed through double[] arrays and this will be gradually converted.
All the routines compile and give answers. The answers were right in the C++ version. Most seem to be right here, but the FITTING ROUTINES ARE CURRENTLY NOT WORKING PROPERLY. This will be fixed...
Default is an empty (Java) Vector;
| Fields inherited from class java.util.Vector |
capacityIncrement,
elementCount,
elementData |
| Fields inherited from class java.util.AbstractList |
modCount |
| Constructor Summary | |
Point3Vector()
|
|
Point3Vector(double[] flarray)
Formed by feeding in an existing array to a 3xn matrix. |
|
Point3Vector(int size)
create a Vector with given number of points |
|
Point3Vector(int n,
double[] x,
double[] y,
double[] z)
from three parallel arrays of x, y and z - by REFERENCE |
|
Point3Vector(Point3Vector pv)
copy constructor from Point3Vector COPIES pv |
|
Point3Vector(RealArray m)
constructor from RealArray - by REFERENCE |
|
| Method Summary | |
void |
addElement(Point3 p)
|
Angle |
angle(int i1,
int i2,
int i3)
get angle between 3 points |
Angle |
angle(IntSet is)
get angle between 3 points |
Plane3 |
bestPlane()
get best plane |
RealArray |
deviationsFromPlane(Plane3 p)
get deviations of coordinates from plane |
double |
distance(int i1,
int i2)
get distance between 2 points |
double |
distance(IntSet is)
get distance between 2 points |
Transform3 |
fitTo(Point3Vector ref)
fit two coordinates of same length and alignment CURRENTLY NOT VALIDATED |
Point3 |
getCentroid()
get centroid of all points |
double |
getCoordinate(int i,
Choice3 j)
get a single coordinate value |
RealSquareMatrix |
getDistanceMatrix()
distance matrix |
Line3 |
getLine(int i1,
int i2)
get the line between two points |
Point3 |
getPoint3(int i)
get a single point by REFERENCE |
RealRange |
getRange(Choice3 ax)
get range of one coordinate |
Real3Range |
getRange3()
get range of all 3 coordinates |
RealArray |
getXYZ()
get the coordinate coordinate array as doubles x,y,z,x,y,z, ... |
RealArray |
getXYZ(Choice3 axis)
get a single coordinate array - e.g. |
void |
inertialAxes(RealArray eigval,
RealSquareMatrix eigvect,
IllCondMatrixException illCond)
get Inertial axes; do not throw exception for pathological cases, but return it. |
RealSquareMatrix |
inertialTensor()
get inertial tensor (second moments) |
void |
moveToCentroid()
centre molecule on origin - translate to centroid MODIFIES PV |
Point3Vector |
plus(Point3Vector pv2)
form the point+point sum for two vectors of points |
Point3Vector |
plus(Vector3 v)
translate by a vector - do NOT modify this |
double |
rms(Point3Vector c)
rms between two molecules - per atom |
Transform3 |
roughAlign(Point3Vector ref)
fit two coordinates of same length and alignment - rough private method fit this to ref (i.e. |
void |
setElementAt(Vector3 v,
int i)
sets a given coordinate (i) to v. |
Point3Vector |
subArray(IntSet is)
create a NEW subset of the points; points are COPIED |
Point3Vector |
subtract(Point3Vector pv2)
form the point+point difference for two vectors of points |
Point3Vector |
subtract(Vector3 v)
translate negatively |
Angle |
torsion(int i1,
int i2,
int i3,
int i4)
get torsion angle between 4 points |
Angle |
torsion(IntSet is)
get torsion angle between 4 points |
void |
transform(Transform3 t)
transform all coordinates MODIFIES Vector |
void |
transform(Transform3 t,
IntSet is)
transform subset of coordinates - MODIFIES Vector |
| Methods inherited from class jumbo.euclid.EuclidVector |
concatenate |
| Methods inherited from class java.util.Vector |
add,
add,
addAll,
addAll,
addElement,
capacity,
clear,
clone,
contains,
containsAll,
copyInto,
elementAt,
elements,
ensureCapacity,
equals,
firstElement,
get,
hashCode,
indexOf,
indexOf,
insertElementAt,
isEmpty,
lastElement,
lastIndexOf,
lastIndexOf,
remove,
remove,
removeAll,
removeAllElements,
removeElement,
removeElementAt,
removeRange,
retainAll,
set,
setElementAt,
setSize,
size,
subList,
toArray,
toArray,
toString,
trimToSize |
| Methods inherited from class java.util.AbstractList |
iterator,
listIterator,
listIterator |
| Methods inherited from class java.lang.Object |
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
| Constructor Detail |
public Point3Vector()
public Point3Vector(int size)
public Point3Vector(double[] flarray)
throws BadArgumentException
public Point3Vector(int n,
double[] x,
double[] y,
double[] z)
public Point3Vector(RealArray m)
throws BadArgumentException
public Point3Vector(Point3Vector pv)
| Method Detail |
public void addElement(Point3 p)
public void setElementAt(Vector3 v,
int i)
throws java.lang.ArrayIndexOutOfBoundsException
public RealRange getRange(Choice3 ax)
public Real3Range getRange3()
public Point3Vector subArray(IntSet is)
throws BadSubscriptException
public Point3Vector plus(Point3Vector pv2)
throws UnequalArraysException
public Point3Vector subtract(Point3Vector pv2)
throws UnequalArraysException
public Line3 getLine(int i1,
int i2)
public Point3 getCentroid()
public Point3Vector plus(Vector3 v)
public Point3Vector subtract(Vector3 v)
public void moveToCentroid()
public RealSquareMatrix inertialTensor()
public void transform(Transform3 t)
public void transform(Transform3 t,
IntSet is)
public double distance(int i1,
int i2)
public double distance(IntSet is)
throws BadArgumentException
public Angle angle(int i1,
int i2,
int i3)
throws ZeroVectorException
public Angle angle(IntSet is)
throws BadArgumentException,
ZeroVectorException
public Angle torsion(int i1,
int i2,
int i3,
int i4)
throws ZeroVectorException
public Angle torsion(IntSet is)
throws BadArgumentException,
ZeroVectorException
public RealSquareMatrix getDistanceMatrix()
public void inertialAxes(RealArray eigval,
RealSquareMatrix eigvect,
IllCondMatrixException illCond)
throws ArrayTooSmallException
public Plane3 bestPlane()
throws ArrayTooSmallException
public RealArray deviationsFromPlane(Plane3 p)
public Point3 getPoint3(int i)
public RealArray getXYZ()
public double getCoordinate(int i,
Choice3 j)
public RealArray getXYZ(Choice3 axis)
public double rms(Point3Vector c)
public Transform3 roughAlign(Point3Vector ref)
throws IllCondMatrixException,
ArrayTooSmallException
CURRENTLY NOT VALIDATED (i.e. broken)
public Transform3 fitTo(Point3Vector ref)
throws ArrayTooSmallException,
IllCondMatrixException
|
|||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||