object Givens
The Givens
objects has methods for determining values 'c = cos(theta)' and
's = sin(theta)' for Givens rotation matrices as well as methods for applying
Givens rotations.
- Alphabetic
- By Inheritance
- Givens
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
- type CosSin = (Double, Double)
Value Members
-
def
givens(y: Double, z: Double): CosSin
Create the values for a Givens 2-by-2 rotation matrix.
Create the values for a Givens 2-by-2 rotation matrix. Given scalars 'y' and 'z', efficiently compute 'c = cos(theta)' and 's = sin(theta)' that can be used to form the rotation matrix.
- y
the first scalar
- z
the second scalar
- See also
http://www.netlib.org/lapack/lawnspdf/lawn150.pdf | y z | | c s | = | hypot(y, z) 0 | | -s c | | c -s | | y | = | hypot(y, z) | | s c | | z | | 0 |
-
def
givensColUpdate(a: MatrixD, i: Int, k: Int, cs: CosSin): Unit
Efficiently perform a Givens column update: a = a * g (i, k, theta).
Efficiently perform a Givens column update: a = a * g (i, k, theta). The update just affects two columns. FIX
- a
the matrix to update
- i
the first column
- k
the second column
- cs
the (cosine, sine) of theta
- See also
Section 5.1.9 in Matrix Computation.
-
def
givensRo(i: Int, k: Int, n: Int, cs: CosSin): MatrixD
Return a Givens rotation matrix with angle 'theta = atan(s/c)'.
Return a Givens rotation matrix with angle 'theta = atan(s/c)'. A matrix is post-multiplied by the Given matrix to clear element (i, k). The 2-by-2 rotation is embedded in an identity matrix of dimension 'n'.
- i
the first diagonal position (i, i)
- k
the second diagonal position (k, k)
- n
the dimension of the resulting rotation matrix
- cs
the (cosine, sine) of theta
-
def
givensRoT(i: Int, k: Int, n: Int, cs: CosSin): MatrixD
Return a transposed Givens rotation matrix with angle 'theta = atan(s/c)'.
Return a transposed Givens rotation matrix with angle 'theta = atan(s/c)'. A matrix is pre-multiplied by the Given matrix to clear element (k, i). The 2-by-2 rotation is embedded in an identity matrix of dimension 'n'.
- i
the first diagonal position (i, i)
- k
the second diagonal position (k, k)
- n
the dimension of the resulting rotation matrix
- cs
the (cosine, sine) of theta
-
def
givensRowUpdate(a: MatrixD, i: Int, k: Int, cs: CosSin): Unit
Efficiently perform a Givens row update: 'a = g (i, k, theta).t * a'.
Efficiently perform a Givens row update: 'a = g (i, k, theta).t * a'. The update just affects two row. FIX
- a
the matrix to update
- i
the first row
- k
the second row
- cs
the (cosine, sine) of theta
- See also
Section 5.1.9 in Matrix Computation.