Jampack
Class Rot
- java.lang.Object
-
- Jampack.Rot
-
public class Rot extends java.lang.ObjectRot generates and manipulates plane rotations. Given a 2-vector compontents are x and y, there is a unitary matrix P such thatP|x| = | c s||x| = |z| |y| |-conj(s) c||y| |0|The number c, which is always real, is the cosine of the rotation. The number s, which may be complex is the sine of the rotation.Comments: This suite will eventually contain methods for real rotations (two are already in place). The only difference between real and complex rotations is that si and zi are zero for the former. The final routines will do the efficient thing.
-
-
Field Summary
Fields Modifier and Type Field and Description doublesiThe imaginary part of the sine of the rotationdoublesrThe real part of the sine of the rotationdoubleziThe imaginary part of the first component of the transformed vectordoublezrThe real part of the first component of the transformed vector
-
Constructor Summary
Constructors Constructor and Description Rot()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method and Description static voidap(Zmat A, Rot P, int ii1, int ii2, int jj1, int jj2)Multiplies columns (ii1:ii2,jj1) and A(ii2:ii2,jj1) of a Zmat (altered) by a plane rotation.static voidaph(Zmat A, Rot P, int ii1, int ii2, int jj1, int jj2)Multiplies columns (ii1:ii2,jj1) and A(ii2:ii2,jj1) of a Zmat (altered) by the conjugate transpose of plane rotation.static Rotgenc(double x, double y)Given a real 2-vector, genc returns a real plane rotation P such thatstatic Rotgenc(double xr, double xi, double yr, double yi)Given the real and imaginary parts of a 2-vector, genc returns a plane rotation P such thatstatic voidgenc(double xr, double xi, double yr, double yi, Rot P)Given the real and imaginary parts of a 2-vector, genc generates a plane rotation P such thatstatic voidgenc(double x, double y, Rot P)Given a real 2-vectc, genc generates a real plane rotation P such thatstatic Rotgenc(Zmat A, int ii1, int ii2, int jj)Given a Zmat A, genc returns a plane rotation that on premultiplication into rows ii1 and ii2 annihilates A(ii2,jj).static voidgenc(Zmat A, int ii1, int ii2, int jj, Rot P)Given a Zmat A, genc generates a plane rotation that on premultiplication into rows ii1 and ii2 annihilates A(ii2,jj).static Rotgenr(double x, double y)Given a real 2-vector, genr returns a plane rotation such thatstatic Rotgenr(double xr, double xi, double yr, double yi)Given the real and imaginary parts of a 2-vector, genr returns a plane rotation such thatstatic voidgenr(double xr, double xi, double yr, double yi, Rot P)Given the real and imaginary parts of a 2-vector, genr generates a plane rotation such thatstatic voidgenr(double x, double y, Rot P)Given a real 2-vector, genr generates a plane rotation such thatstatic Rotgenr(Zmat A, int ii, int jj1, int jj2)Given a Zmat A, genr returns a plane rotation that on postmultiplication into column jj1 and jj2 annihilates A(ii,jj2).static voidgenr(Zmat A, int ii, int jj1, int jj2, Rot P)Given a Zmat A, genr generates a plane rotation that on postmultiplication into column jj1 and jj2 annihilates A(ii,jj2).static voidpa(Rot P, Zmat A, int ii1, int ii2, int jj1, int jj2)Multiplies rows (ii1,jj1:jj2) and (ii2,jj1:jj2) of a Zmat (altered) by a plane rotation.static voidpha(Rot P, Zmat A, int ii1, int ii2, int jj1, int jj2)Multiplies rows (ii1,jj1:jj2) and (ii2,jj1:jj2) of a Zmat (altered) by the conjugate transpose of a plane rotation.
-
-
-
Field Detail
-
sr
public double sr
The real part of the sine of the rotation
-
si
public double si
The imaginary part of the sine of the rotation
-
zr
public double zr
The real part of the first component of the transformed vector
-
zi
public double zi
The imaginary part of the first component of the transformed vector
-
-
Method Detail
-
genc
public static Rot genc(double xr, double xi, double yr, double yi)
Given the real and imaginary parts of a 2-vector, genc returns a plane rotation P such thatP|x| = | c s||x| = |z| |y| |-conj(s) c||y| |0|- Parameters:
xr- The real part of the first component of the 2-vectorxi- The imaginary part of the first component of the 2-vectoryr- The real part of the second component of the 2-vectoryi- The imaginary part of the second component of the 2-vector- Returns:
- The rotation
-
genc
public static void genc(double xr, double xi, double yr, double yi, Rot P)Given the real and imaginary parts of a 2-vector, genc generates a plane rotation P such thatP|x| = | c s||x| = |z| |y| |-conj(s) c||y| |0|- Parameters:
xr- The real part of the first component of the 2-vectorxi- The imaginary part of the first component of the 2-vectoryr- The real part of the second component of the 2-vectoryi- The imaginary part of the second component of the 2-vectorP- The rotation (must be initialized)
-
genc
public static Rot genc(double x, double y)
Given a real 2-vector, genc returns a real plane rotation P such thatP|x| = | c s||x| = |z| |y| |-s c||y| |0|- Parameters:
x- The first component of the two vectory- The second component of the two vector- Returns:
- The rotation
-
genc
public static void genc(double x, double y, Rot P)Given a real 2-vectc, genc generates a real plane rotation P such thatP|x| = | c s||x| = |z| |y| |-s c||y| |0|- Parameters:
x- The first component of the two vectory- The second component of the two vectorP- The plane rotation
-
genc
public static Rot genc(Zmat A, int ii1, int ii2, int jj)
Given a Zmat A, genc returns a plane rotation that on premultiplication into rows ii1 and ii2 annihilates A(ii2,jj). The element A(ii2,jj) is overwriten by zero and the element A(ii1,jj) is overwritten by its transformed value.- Parameters:
A- The Zmat (altered)ii1- The row index of the first elementii2- The row index of the second element (the one that is annihilatedjj- The column index of the elements- Returns:
- The plane rotation
-
genc
public static void genc(Zmat A, int ii1, int ii2, int jj, Rot P)
Given a Zmat A, genc generates a plane rotation that on premultiplication into rows ii1 and ii2 annihilates A(ii2,jj). The element A(ii2,jj) is overwriten by zero and the element A(ii1,jj) is overwritten by its transformed value.- Parameters:
A- The Zmat (altered)ii1- The row index of the first elementii2- The row index of the second element (the one that is annihilatedjj- The column index of the elementsP- The plane rotation (must be initialized)
-
genr
public static Rot genr(double xr, double xi, double yr, double yi)
Given the real and imaginary parts of a 2-vector, genr returns a plane rotation such that|x y|P = |x y|| c s||x| = |z 0| |-conj(s) c||y|- Parameters:
xr- The real part of the first component of the 2-vectorxi- The imaginary part of the first component of the 2-vectoryr- The real part of the second component of the 2-vectoryi- The imaginary part of the second component of the 2-vector- Returns:
- The rotation
-
genr
public static void genr(double xr, double xi, double yr, double yi, Rot P)Given the real and imaginary parts of a 2-vector, genr generates a plane rotation such that|x y|P = |x y|| c s||x| = |z 0| |-conj(s) c||y|- Parameters:
xr- The real part of the first component of the 2-vectorxi- The imaginary part of the first component of the 2-vectoryr- The real part of the second component of the 2-vectoryi- The imaginary part of the second component of the 2-vectorP- The plane rotation (must be initialized)
-
genr
public static Rot genr(Zmat A, int ii, int jj1, int jj2)
Given a Zmat A, genr returns a plane rotation that on postmultiplication into column jj1 and jj2 annihilates A(ii,jj2). The element A(ii,jj2) is overwirten by zero and the element A(ii,jj1) is overwritten by its transformed value.- Parameters:
A- The Zmat (altered)ii- The index of the row containing the elementsjj1- The column index of the first elementjj2- The column index of the second element (the one that is annihilated)- Returns:
- The rotation
-
genr
public static void genr(Zmat A, int ii, int jj1, int jj2, Rot P)
Given a Zmat A, genr generates a plane rotation that on postmultiplication into column jj1 and jj2 annihilates A(ii,jj2). The element A(ii,jj2) is overwirten by zero and the element A(ii,jj1) is overwritten by its transformed value.- Parameters:
A- The Zmat (altered)ii- The index of the row containing the elementsjj1- The column index of the first elementjj2- The column index of the second element (the one that is annihilated)P- The rotation
-
genr
public static Rot genr(double x, double y)
Given a real 2-vector, genr returns a plane rotation such that|x y|P = |x y|| c s||x| = |z 0| |-s c||y|- Parameters:
x- The first component of the 2-vectory- The second component of the 2-vector- Returns:
- The rotation
-
genr
public static void genr(double x, double y, Rot P)Given a real 2-vector, genr generates a plane rotation such that|x y|P = |x y|| c s||x| = |z 0| |-s c||y|- Parameters:
x- The first component of the 2-vectory- The second component of the 2-vectorP- The rotation
-
pa
public static void pa(Rot P, Zmat A, int ii1, int ii2, int jj1, int jj2)
Multiplies rows (ii1,jj1:jj2) and (ii2,jj1:jj2) of a Zmat (altered) by a plane rotation.- Parameters:
P- The plane rotationA- The Zmat (altered)ii1- The row index of the first row.ii2- The row index of the second row.jj1- The first index of the range of the rowsjj2- The second index of the range of the rows
-
pha
public static void pha(Rot P, Zmat A, int ii1, int ii2, int jj1, int jj2)
Multiplies rows (ii1,jj1:jj2) and (ii2,jj1:jj2) of a Zmat (altered) by the conjugate transpose of a plane rotation.- Parameters:
P- The plane rotationA- The Zmat (altered)ii1- The row index of the first row.ii2- The row index of the second row.jj1- The first index of the range of the rowsjj2- The second index of the range of the rows
-
ap
public static void ap(Zmat A, Rot P, int ii1, int ii2, int jj1, int jj2)
Multiplies columns (ii1:ii2,jj1) and A(ii2:ii2,jj1) of a Zmat (altered) by a plane rotation.- Parameters:
A- The Zmat (altered)P- The rotationii1- The first index of the column rangeii2- The second index of the column rangejj1- The index of the first columnjj2- The index of the second column
-
aph
public static void aph(Zmat A, Rot P, int ii1, int ii2, int jj1, int jj2)
Multiplies columns (ii1:ii2,jj1) and A(ii2:ii2,jj1) of a Zmat (altered) by the conjugate transpose of plane rotation.- Parameters:
A- The Zmat (altered)P- The rotationii1- The first index of the column rangeii2- The second index of the column rangejj1- The index of the first columnjj2- The index of the second column
-
-
DMelt 3.0 © DataMelt by jWork.ORG