scalation

linalgebra

package linalgebra

The linalgebra package contains classes, traits and objects for linear algebra, including vectors and matrices for real and complex numbers.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. linalgebra
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. class BidMatrixD extends Matrix with Error with Serializable

    The BidMatrixD class stores and operates on bidiagoanl matrices.

    The BidMatrixD class stores and operates on bidiagoanl matrices. The elements are of type of Double. A matrix is stored as two vectors: the diagonal vector and the sup-diagonal vector.

  2. class Bidiagonal extends Error

    The Bidiagonal class is used to creates a bidiagonal matrix for matrix 'a'.

    The Bidiagonal class is used to creates a bidiagonal matrix for matrix 'a'. It uses the Householder Bidiagonalization Algorithm to compute orthogonal matrices 'u' and 'v' such that

    u.t * a * v = b a = u * b * v.t

    where matrix 'b' is bidiagonal, i.e, it will only have non-zero elements on its main diagonal and its super-diagonal (the diagonal above the main).

  3. trait Eigen extends AnyRef

    The Eigen trait defines constants used by classes and objects the Eigen group.

  4. class Eigenvalue extends Eigen with Error

    The Eigenvalue class is used to find the eigenvalues of an 'n' by 'n' matrix 'a' using an iterative technique that applies similarity transformations to convert 'a' into an upper triangular matrix, so that the eigenvalues appear along the diagonal.

    The Eigenvalue class is used to find the eigenvalues of an 'n' by 'n' matrix 'a' using an iterative technique that applies similarity transformations to convert 'a' into an upper triangular matrix, so that the eigenvalues appear along the diagonal. To improve performance, the 'a' matrix is first reduced to Hessenburg form. During the iterative steps, a shifted QR decomposition is performed. Caveats: (i) it will not handle eigenvalues that are complex numbers, (ii) it uses a simple shifting strategy that may slow convergence.

  5. class EigenvalueSym extends Eigen with Error

    The EigenvalueSym class is used to find the eigenvalues of an 'n' by 'n' symmetric matrix 'a' using an iterative technique, the Symmetric QR Algorithm.

    The EigenvalueSym class is used to find the eigenvalues of an 'n' by 'n' symmetric matrix 'a' using an iterative technique, the Symmetric QR Algorithm.

    See also

    Algorithm 8.3.3 in Matrix Computations. Caveats: (i) it will not handle eigenvalues that are complex numbers, (ii) it uses a simple shifting strategy that may slow convergence.

  6. class Eigenvector extends Eigen with Error

    The Eigenvector class is used to find the eigenvectors of an 'n' by 'n' matrix 'a' by solving equations of the form

    The Eigenvector class is used to find the eigenvectors of an 'n' by 'n' matrix 'a' by solving equations of the form

    (a - eI)v = 0

    where 'e' is the eigenvalue and 'v' is the eigenvector. Place the eigenvectors in a matrix column-wise.

  7. class Fac_Cholesky extends Factorization with Error

    The Fac_Cholesky class provides methods to factor an 'n-by-n' symmetric, positive definite matrix 'a' into the product of two matrices:

    The Fac_Cholesky class provides methods to factor an 'n-by-n' symmetric, positive definite matrix 'a' into the product of two matrices:

    'l' - an 'n-by-n' left lower triangular matrix 'l.t' - an 'n-by-n' right upper triangular matrix - transpose of 'l'

    such that 'a = l * l.t'.

  8. class Fac_QR extends Factorization with Error

    The Fac_QR class provides methods to factor an 'm-by-n' matrix 'a' into the product of two matrices:

    The Fac_QR class provides methods to factor an 'm-by-n' matrix 'a' into the product of two matrices:

    'q' - an 'm-by-n' orthogonal matrix and 'r' - an 'n-by-n' right upper triangular matrix

    such that 'a = q * r'. Note, orthogonal means that 'q.t * q = I'.

    See also

    http://en.wikipedia.org/wiki/Gram–Schmidt_process (stabilized Gram–Schmidt orthonormalization)

    http://www.stat.wisc.edu/~larget/math496/qr.html

  9. trait Factorization extends AnyRef

    The Factorization trait the template for classes implementing various forms of matrix factorization.

  10. class Hessenburg extends Eigen with Error

    The Hessenburg class is used to reduce, via similarity transformations, an 'n' by 'n' matrix 'a' to Hessenburg form 'h', where all elements two below the main diagonal are zero (or close to zero).

    The Hessenburg class is used to reduce, via similarity transformations, an 'n' by 'n' matrix 'a' to Hessenburg form 'h', where all elements two below the main diagonal are zero (or close to zero). Note, similarity transformations do not changes the eigenvalues.

  11. class HouseholderT extends Eigen with Error

    The HouseholderT class performs a Householder Tridiagonalization on a symmetric matrix.

    The HouseholderT class performs a Householder Tridiagonalization on a symmetric matrix.

    See also

    Algorithm 8.3.1 in Matrix Computations.

  12. trait Matric extends Error

    The Matric trait specifies the operations to be defined by three concrete implemeting classes: MatrixC, SparseMatrixC and SymTriMatrixC.

  13. trait Matrii extends Error

    The Matrii trait specifies the operations to be defined by four concrete implemeting classes: MatrixI.

  14. trait Matrir extends Error

    The Matrir trait specifies the operations to be defined by three concrete implemeting classes: MatrixR, SparseMatrixR and SymTriMatrixR.

  15. trait Matrix extends Error

    The Matrix trait specifies the operations to be defined by four concrete implemeting classes: MatrixD, ParMatrixD, SparseMatrixD and SymTriMatrixD.

  16. class MatrixC extends Matric with Error with Serializable

    The MatrixC class stores and operates on Numeric Matrices of type Complex.

    The MatrixC class stores and operates on Numeric Matrices of type Complex. This class follows the MatrixN framework and is provided for efficieny.

  17. class MatrixD extends Matrix with Error with Serializable

    The MatrixD class stores and operates on Numeric Matrices of type Double.

    The MatrixD class stores and operates on Numeric Matrices of type Double. This class follows the MatrixN framework and is provided for efficieny.

  18. class MatrixI extends Matrii with Error with Serializable

    The MatrixI class stores and operates on Numeric Matrices of type Int.

    The MatrixI class stores and operates on Numeric Matrices of type Int. This class follows the MatrixN framework and is provided for efficieny.

  19. class MatrixR extends Matrir with Error with Serializable

    The MatrixR class stores and operates on Numeric Matrices of type Rational.

    The MatrixR class stores and operates on Numeric Matrices of type Rational. This class follows the MatrixN framework and is provided for efficieny.

  20. case class Rotation(cs: Double, sn: Double, r: Double) extends Product with Serializable

    The Rotation class is a data structure for holding the results of rotating by angle a.

    The Rotation class is a data structure for holding the results of rotating by angle a.

    cs

    the cos (a)

    sn

    the sin (a)

    r

    the nonzero element of the rotated vector

  21. class SVD extends SVDecomp with Error

    The SVD class is used to compute the Singlar Value Decomposition (SVD) of matrix 'aa' using the Golub-Kahan-Reinsch Algorithm.

    The SVD class is used to compute the Singlar Value Decomposition (SVD) of matrix 'aa' using the Golub-Kahan-Reinsch Algorithm. Decompose matrix 'aa' into the product of three matrices:

    aa = uu * a * vv.t

    where 'uu' is a matrix of orthogonal eigenvectors of 'aa * aa.t' (LEFT SINGULAR VECTORS) 'vv' is a matrix of orthogonal eigenvectors of 'aa.t * aa' (RIGHT SINGULAR VECTORS) and 'a' is a diagonal matrix of square roots of eigenvalues of 'aa.t * aa' &' aa * aa.t' (SINGULAR VALUES).

  22. class SVD2 extends SVDecomp

    The SVD2 class performs Single Value Decompositions (SVDs) using the Eigen class.

    The SVD2 class performs Single Value Decompositions (SVDs) using the Eigen class. For a direct, more robust algorithm that is less sensitive to round-off errors,

    See also

    the SVD class.

  23. class SVD3 extends SVDecomp

    The SVD3 class is used to solve Singular Value Decomposition for bidiagonal matrices.

    The SVD3 class is used to solve Singular Value Decomposition for bidiagonal matrices.

    It computes the singular values and, optionally, the right and/or left singular vectors from the singular value decomposition (SVD) of a real n-by-n (upper) bidiagonal matrix B using the implicit zero-shift QR algorithm. The SVD of B has the form

    B = Q * S * P.t

    where S is the diagonal matrix of singular values, Q is an orthogonal matrix of left singular vectors, and P is an orthogonal matrix of right singular vectors. If left singular vectors are requested, this subroutine actually returns U*Q instead of Q, and, if right singular vectors are requested, this subroutine returns P.t * VT instead of P.T, for given real input matrices U and VT. When U and VT are the orthogonal matrices that reduce a general matrix A to bidiagonal form: A = U*B*VT, as computed by DGEBRD, then

    A = (U*Q) * S * (P.t*VT)

    is the SVD of the general matrix A. A positve tolerance (TOL) gives relative accurracy; for absolute accurracy negate it.

    See also

    LAPACK SUBROUTINE DBDSQR (UPLO, N, NCVT, NRU, NCC, D, E, VT, LDVT, U, LDU, C, LDC, WORK, INFO)

    fortranwiki.org/fortran/show/svd

    "Accurate singular values and differential qd algorithms," B. Parlett and V. Fernando, Technical Report CPAM-554, Mathematics Department, University of California at Berkeley, July 1992

    "Computing Small Singular Values of Bidiagonal Matrices With Guaranteed High Relative Accuracy," J. Demmel and W. Kahan, LAPACK Working Note #3 (or SIAM J. Sci. Statist. Comput. 11:5, pp. 873-912, Sept 1990)

  24. class SVD_2by2 extends SVDecomp

    The SVD_2by2 is used to solve Singular Value Decomposition for bidiagonal 2-by-2 matrices.

    The SVD_2by2 is used to solve Singular Value Decomposition for bidiagonal 2-by-2 matrices.

    [ f g ] [ 0 h ]

    See also

    fortranwiki.org/fortran/show/svd

  25. trait SVDecomp extends AnyRef

    The SVDDecomp trait specifies the major methods for Singular Value Decomposition implementations.

  26. class SparseMatrixC extends Matric with Error with Serializable

    The SparseMatrixC class stores and operates on Matrices of Complex numbers.

    The SparseMatrixC class stores and operates on Matrices of Complex numbers. Rather than storing the matrix as a 2 dimensional array, it is stored as an array of sorted-linked-maps, which record all the non-zero values for each particular row, along with their j-index as (j, v) pairs. Note: _npp versions of methods are not appropriate for sparse matrices (i.e., always use partial pivoting).

  27. class SparseMatrixD extends Matrix with Error with Serializable

    The SparseMatrixD class stores and operates on Matrices of Doubles.

    The SparseMatrixD class stores and operates on Matrices of Doubles. Rather than storing the matrix as a 2 dimensional array, it is stored as an array of sorted-linked-maps, which record all the non-zero values for each particular row, along with their j-index as (j, v) pairs. Note: _npp versions of methods are not appropriate for sparse matrices (i.e., always use partial pivoting).

  28. class SymTriMatrixC extends Matric with Error with Serializable

    The SymTriMatrixC class stores and operates on symmetric tridiagonal matrices.

    The SymTriMatrixC class stores and operates on symmetric tridiagonal matrices. The elements are of type of Complex. A matrix is stored as two vectors: the diagonal vector and the sub-diagonal vector.

  29. class SymTriMatrixD extends Matrix with Error with Serializable

    The SymTriMatrixD class stores and operates on symmetric tridiagonal matrices.

    The SymTriMatrixD class stores and operates on symmetric tridiagonal matrices. The elements are of type of Double. A matrix is stored as two vectors: the diagonal vector and the sub-diagonal vector.

  30. class VectorC extends Traversable[Complex] with PartiallyOrdered[VectorC] with Error with Serializable

    The VectorC class stores and operates on Numeric Vectors of base type Complex.

    The VectorC class stores and operates on Numeric Vectors of base type Complex. It follows the framework of VectorN [T] and is provided for performance.

  31. class VectorD extends Traversable[Double] with PartiallyOrdered[VectorD] with Error with Serializable

    The VectorD class stores and operates on Numeric Vectors of base type Double.

    The VectorD class stores and operates on Numeric Vectors of base type Double. It follows the framework of VectorN [T] and is provided for performance.

  32. class VectorI extends Traversable[Int] with PartiallyOrdered[VectorI] with Error with Serializable

    The VectorI class stores and operates on Numeric Vectors of base type Int.

    The VectorI class stores and operates on Numeric Vectors of base type Int. It follows the framework of VectorN [T] and is provided for performance.

  33. class VectorR extends Traversable[Rational] with PartiallyOrdered[VectorR] with Error with Serializable

    The VectorR class stores and operates on Numeric Vectors of base type Rational.

    The VectorR class stores and operates on Numeric Vectors of base type Rational. It follows the framework of VectorN [T] and is provided for performance.

Value Members

  1. object BidMatrixDTest extends App

    The BidMatrixDTest object is used to test the BidMatrixD class.

  2. object BidiagonalTest extends App

    The BidiagonalTest object is used to test the Bidiagonal class.

    The BidiagonalTest object is used to test the Bidiagonal class. bidiagonalization answer = [ (21.8, -.613), (12.8, 2.24, 0.) ]

    See also

    books.google.com/books?isbn=0801854148 (p. 252)

  3. object EigenTest extends App

    The EigenTest object is used to test the all the classes used in computing Eigenvalues and Eigenvectors for the non-symmetric/general case.

  4. object Eigen_2by2 extends Error

    The Eigen_2by2 object provides simple methods for computing eigenvalues and eigenvectors for 2-by-2 matrices.

  5. object Eigen_2by2Test extends App

    The Eigen_2by2Test is used to test the Eigen_2by2 object.

  6. object Fac_CholeskyTest extends App

    The Fac_CholeskyTest object is used to test the Fac_Cholesky class.

    The Fac_CholeskyTest object is used to test the Fac_Cholesky class.

    See also

    ece.uwaterloo.ca/~dwharder/NumericalAnalysis/04LinearAlgebra/cholesky

  7. object Fac_QRTest extends App

    The Fac_QRTest object is used to test the Fac_QR class.

    The Fac_QRTest object is used to test the Fac_QR class.

    See also

    http://www.ee.ucla.edu/~vandenbe/103/lectures/qr.pdf

  8. object Givens

    The Givens objects has methods for determinng values 'c = cos(theta)' and 's = sin(theta) for Givens rotation matrices as well as methods for applying Givens rotations.

  9. object GivensTest extends App

    The GivensTest object tests the Givens object by using two rotations to turn matrix 'a' into an upper triangular matrix, clearing positions (1, 0) and (2, 1).

    The GivensTest object tests the Givens object by using two rotations to turn matrix 'a' into an upper triangular matrix, clearing positions (1, 0) and (2, 1). A third rotation clears position (0, 1) but also puts a non-zero value at (1, 0).

    See also

    http://en.wikipedia.org/wiki/Givens_rotation

  10. object Householder

    The Householder object provides methods to compute Householder vectors and reflector matrices.

  11. object HouseholderTest extends App

    The HouseholderTest object is used to test Householder object.

    The HouseholderTest object is used to test Householder object.

    See also

    www.math.siu.edu/matlab/tutorial4.pdf

  12. object MatrixC extends Error with Serializable

    The MatrixC companion object provides operations for MatrixC that don't require 'this' (like static methods in Java).

    The MatrixC companion object provides operations for MatrixC that don't require 'this' (like static methods in Java). Typically used to form matrices from vectors.

  13. object MatrixCTest extends App

    The MatrixCTest object tests the operations provided by MatrixC class.

  14. object MatrixD extends Error with Serializable

    The MatrixD companion object provides operations for MatrixD that don't require 'this' (like static methods in Java).

    The MatrixD companion object provides operations for MatrixD that don't require 'this' (like static methods in Java). It provides factory methods for building matrices from files or vectors.

  15. object MatrixDTest extends App

    The MatrixDTest object tests the operations provided by MatrixD class.

  16. object MatrixI extends Error with Serializable

    The MatrixI companion object provides operations for MatrixI that don't require 'this' (like static methods in Java).

    The MatrixI companion object provides operations for MatrixI that don't require 'this' (like static methods in Java). It provides factory methods for building matrices from files or vectors.

  17. object MatrixITest extends App

    The MatrixITest object tests the operations provided by MatrixI class.

  18. object MatrixR extends Error with Serializable

    The MatrixR companion object provides operations for MatrixR that don't require 'this' (like static methods in Java).

    The MatrixR companion object provides operations for MatrixR that don't require 'this' (like static methods in Java). Typically used to form matrices from vectors.

  19. object MatrixRTest extends App

    The MatrixRTest object tests the operations provided by MatrixR class.

  20. object Rotation extends Serializable

    The Rotation object provides methods for rotating in a plane.

    The Rotation object provides methods for rotating in a plane.

    [ cs sn ] . [ f ] = [ r ] where cs2 + sn2 = 1 [ -sn cs ] [ g ] [ 0 ]

  21. object RotationTest extends App

    The RotationTest object is used to test the Rotation object,

  22. object SVD

    The SVD companion object.

  23. object SVD2Test extends App

    The SVD2Test object is used to test the SVD2 class.

    The SVD2Test object is used to test the SVD2 class.

    See also

    www.ling.ohio-state.edu/~kbaker/pubs/Singular_Value_Decomposition_Tutorial.pdf

  24. object SVD2Test2 extends App

    The SVD2Test2 object is used to test the SVD2 class.

  25. object SVD3Test extends App

    The SVD3Test is used to test the SVD3 class.

    The SVD3Test is used to test the SVD3 class. Answer: singular values = (2.28825, 0.87403)

    See also

    http://comnuan.com/cmnn01004/

  26. object SVD3Test2 extends App

    The SVD3Test2 is used to test the SVD3 class.

    The SVD3Test2 is used to test the SVD3 class. Answer: singular values = (3.82983, 1.91368, 0.81866)

  27. object SVDTest extends App

    The SVDTest object is used to test the SVD class starting with a matrix that is already bidiagonalized and gives eigenvalues of 28, 18 for the first step.

    The SVDTest object is used to test the SVD class starting with a matrix that is already bidiagonalized and gives eigenvalues of 28, 18 for the first step.

    See also

    http://ocw.mit.edu/ans7870/18/18.06/javademo/SVD/

  28. object SVDTest2 extends App

    The SVDTest2 is used to test the SVD class.

    The SVDTest2 is used to test the SVD class. Answer: singular values = (3.82983, 1.91368, 0.81866)

  29. object SVDTest3 extends App

    The SVDTest3 object is used to test the SVD class starting with a general matrix.

    The SVDTest3 object is used to test the SVD class starting with a general matrix.

    See also

    www.mathstat.uottawa.ca/~phofstra/MAT2342/SVDproblems.pdf

  30. object SVDTest4 extends App

    The SVDTest4 object is used to test the SVD companion object.

  31. object SVD_2by2Test extends App

    The SVD_2by2Test is used to test the SVD_2by2 class.

  32. object SparseMatrixC extends Serializable

    The SparseMatrixC objecxt is the companion object for the SparseMatrixC class.

  33. object SparseMatrixCTest extends App

    The SparseMatrixCTest object is used to test the SparseMatrixC class.

  34. object SparseMatrixD extends Serializable

    The SparseMatrixD object is the companion object for the SparseMatrixD class.

  35. object SparseMatrixDTest extends App

    The SparseMatrixDTest object is used to test the SparseMatrixD class.

  36. object SymTriMatrixCTest extends App

    The SymTriMatrixCTest object is used to test the SymTriMatrixC class.

  37. object SymTriMatrixDTest extends App

    The SymTriMatrixDTest object is used to test the SymTriMatrixD class.

  38. object SymmetricQRstep extends Eigen with Error

    The SymmetricQRstep object performs a symmetric QR step with a Wilkinson shift.

    The SymmetricQRstep object performs a symmetric QR step with a Wilkinson shift.

    See also

    http://people.inf.ethz.ch/arbenz/ewp/Lnotes/chapter3.pdf (Algorithm 3.6)

    Algorithm 8.3.2 in Matrix Computations.

  39. object VectorC extends Serializable

    The VectorC object is the companion object for VectorC class.

  40. object VectorCTest extends App

    The VectorCTest object tests the operations provided by VectorC class.

  41. object VectorD extends Serializable

    The VectorD object is the companion object for the VectorD class.

  42. object VectorDTest extends App

    The VectorDTest object tests the operations provided by VectorD.

  43. object VectorI extends Serializable

    The VectorI object is the companion object for the VectorI class.

  44. object VectorITest extends App

    The VectorITest object tests the operations provided by VectorI.

  45. object VectorR extends Serializable

    The VectorR object is the companion object for Vector class.

  46. object VectorRTest extends App

    The VectorRTest object tests the operations provided by VectorR class.

  47. package gen

  48. package par

Inherited from AnyRef

Inherited from Any

Ungrouped