Extreme Optimization™: Complexity made simple.

Numerical Components
for .NET

  • Home
  • Features
    • Math Library
    • Vector and Matrix Library
    • Statistics Library
    • Performance
    • Usability
  • Documentation
    • Introduction
    • Math Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Resources
    • Downloads
    • QuickStart Samples
    • Sample Applications
    • Frequently Asked Questions
    • Technical Support
  • Blog
  • Order
  • Company
    • About us
    • Testimonials
    • Customers
    • Press Releases
    • Careers
    • Contact us
Introduction
Deployment Guide
Using Parallelism
Expand Mathematics Library User's GuideMathematics Library User's Guide
Expand Vector and Matrix Library User's GuideVector and Matrix Library User's Guide
Expand Statistics Library User's GuideStatistics Library User's Guide
Expand ReferenceReference
  • Home
    • Features
    • Solutions
    • Documentation
    • QuickStart Samples
    • Sample Applications
    • Downloads
    • Technical Support
    • Download trial
    • How to buy
    • Blog
    • Company
    • Resources
  • Documentation
    • Introduction
    • Deployment Guide
    • Using Parallelism
    • Mathematics Library User's Guide
    • Vector and Matrix Library User's Guide
    • Statistics Library User's Guide
    • Reference
  • Reference
    • Extreme.Mathematics Namespace
    • Extreme.Mathematics.Algorithms Namespace
    • Extreme.Mathematics.Calculus Namespace
    • Extreme.Mathematics.Calculus.OrdinaryDifferentialEquations Namespace
    • Extreme.Mathematics.Curves Namespace
    • Extreme.Mathematics.Curves.Nonlinear Namespace
    • Extreme.Mathematics.EquationSolvers Namespace
    • Extreme.Mathematics.Generic Namespace
    • Extreme.Mathematics.Generic.LinearAlgebra Namespace
    • Extreme.Mathematics.Generic.LinearAlgebra.Providers Namespace
    • Extreme.Mathematics.LinearAlgebra Namespace
    • Extreme.Mathematics.LinearAlgebra.Complex Namespace
    • Extreme.Mathematics.LinearAlgebra.Complex.Decompositions Namespace
    • Extreme.Mathematics.LinearAlgebra.IO Namespace
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers Namespace
    • Extreme.Mathematics.LinearAlgebra.IterativeSolvers.Preconditioners Namespace
    • Extreme.Mathematics.LinearAlgebra.Providers Namespace
    • Extreme.Mathematics.LinearAlgebra.Sparse Namespace
    • Extreme.Mathematics.Optimization Namespace
    • Extreme.Mathematics.Optimization.LineSearches Namespace
    • Extreme.Mathematics.SignalProcessing Namespace
    • Extreme.Statistics Namespace
    • Extreme.Statistics.Distributions Namespace
    • Extreme.Statistics.IO Namespace
    • Extreme.Statistics.Multivariate Namespace
    • Extreme.Statistics.Random Namespace
    • Extreme.Statistics.Tests Namespace
    • Extreme.Statistics.TimeSeriesAnalysis Namespace
  • Extreme.Mathematics.LinearAlgebra Namespace
    • BandMatrix Class
    • BandVector Class
    • CholeskyDecomposition Class
    • CloningMethod Enumeration
    • ColumnCollection Structure
    • ComponentReadOnlyException Class
    • ConstantMatrix Class
    • ConstantVector Class
    • Decomposition Class
    • DenseMatrix Class
    • DenseVector Class
    • DiagonalMatrix Class
    • EigenvalueDecomposition Class
    • IDoubleStorage Interface
    • ILeastSquaresSolver Interface
    • IndexedVector Class
    • IndexValuePair Structure
    • IResizableMatrix Interface
    • ISingleLeastSquaresSolver Interface
    • ISingleResizableMatrix Interface
    • ISingleStorage Interface
    • Kernel Class
    • LeastSquaresSolutionMethod Enumeration
    • LeastSquaresSolver Class
    • LinearOperator Class
    • LUDecomposition Class
    • MatrixNotPositiveDefiniteException Class
    • MatrixSingularException Class
    • MatrixStructure Enumeration
    • MatrixView Class
    • NonNegativeMatrixFactorization Class
    • NonsymmetricEigenvalueDecomposition Class
    • PermutationMatrix Class
    • PivotVector Structure
    • QRDecomposition Class
    • Range Structure
    • RowCollection Structure
    • RowColumnValueTriplet Structure
    • SingleBandCholeskyDecomposition Class
    • SingleBandLUDecomposition Class
    • SingleBandMatrix Class
    • SingleBandVector Class
    • SingleBandVector.BandVectorEnumerator Structure
    • SingleCholeskyDecomposition Class
    • SingleColumnCollection Structure
    • SingleConstantMatrix Class
    • SingleConstantVector Class
    • SingleDecomposition Class
    • SingleDenseMatrix Class
    • SingleDenseVector Class
    • SingleDiagonalMatrix Class
    • SingleEigenvalueDecomposition Class
    • SingleIndexedVector Class
    • SingleIndexValuePair Structure
    • SingleKernel Class
    • SingleLeastSquaresSolver Class
    • SingleLinearTransformation Class
    • SingleLUDecomposition Class
    • SingleMatrixView Class
    • SinglePermutationMatrix Class
    • SingleQRDecomposition Class
    • SingleRowCollection Structure
    • SingleRowColumnValueTriplet Structure
    • SingleSingularValueDecomposition Class
    • SingleSparseLUDecomposition Class
    • SingleSparseMatrix Class
    • SingleSparseVector Class
    • SingleSymmetricEigenvalueDecomposition Class
    • SingleSymmetricMatrix Class
    • SingleTriangularMatrix Class
    • SingularValueDecomposition Class
    • SingularValueDecompositionFactors Enumeration
    • SparseCompressedColumnMatrix Class
    • SparseMatrix Class
    • SparseVector Class
    • SymmetricEigenvalueDecomposition Class
    • SymmetricMatrix Class
    • TriangularMatrix Class
  • SingleSparseMatrix Class
    • Members
    • Constructors
    • Methods
    • Properties
Collapse image Expand Image Copy image CopyHover image
         




SingleSparseMatrix Class

Members See Also 
Represents a sparse matrix.

Namespace: Extreme.Mathematics.LinearAlgebra
Assembly: Extreme.Numerics.SinglePrecision.Net40 (in Extreme.Numerics.SinglePrecision.Net40.dll) Version: 4.0.10170.0 (4.0.11003.0)

Syntax

C#
                      public abstract class SingleSparseMatrix : SingleMatrix
Visual Basic (Declaration)
                      Public MustInherit Class SingleSparseMatrix _
	Inherits SingleMatrix
Visual C++
                      public ref class SingleSparseMatrix abstract : public SingleMatrix
F#
[<AbstractClassAttribute>]
type SingleSparseMatrix =  
    class
        inherit SingleMatrix
    end

Remarks

Use the SingleSparseMatrix class to represent matrices with only a small proportion of nonzero components. Only the nonzero components of the matrix are stored. This not only saves memory, but also allows many calculations to be performed faster.

The components of a sparse matrix can be specified in a variety of ways. A common method is to supply the rows, columns, and values of the nonzero components. Another way is to build up the matrix using the

CopyC#
Insert
methods: InsertEntry(Single, Int32, Int32), InsertEntries(array<Single>[]()[][], array<Int32>[]()[][], array<Int32>[]()[][]), InsertRow(Int32, array<Single>[]()[][], array<Int32>[]()[][]), InsertColumn(Int32, array<Single>[]()[][], array<Int32>[]()[][]), InsertClique(array<Single>[]()[][], array<Int32>[]()[][], array<Int32>[]()[][]). Individual components can also be set, but this is generally less efficient.

Sparse matrices can also be read directly from data files in Matrix Market format. Use the MatrixMarketReader for this purpose.

The NonzeroCount property returns the number of nonzero components. The FillFactor property returns a number between 0 and 1 that is the proportion of nonzero components to the total number of components in the matrix. To iterate through the nonzero components of a sparse matrix, use the NonzeroComponents property. This property enumerates SingleRowColumnValueTriplet objects, each containing the row, column, and value of a nonzero component.

A disadvantage of sparse matrices is that working with individual components tends to be slower. Every access usually requires a lookup in a list. To avoid duplicate lookups for elementary operations on components, use one of the specialized methods: AddAt(Int32, Int32, Single), SubtractAt(Int32, Int32, Single), MultiplyAt(Int32, Int32, Single) and DivideAt(Int32, Int32, Single).

The SingleSparseMatrix class is an abstract base class for all types that represent sparse matrices. The class cannot be instantiated. Instead, create instances of one of its derived types:

ClassDescription
SingleSparseCompressedColumnMatrixRepresents a sparse matrix in Compressed Sparse Column (CSC) format, sometimes also called Compressed Column Storage (CCS).

Inheritance Hierarchy

System..::..Object
  Extreme.Mathematics.LinearAlgebra..::..SingleLinearTransformation
    Extreme.Mathematics..::..SingleMatrix
      Extreme.Mathematics.LinearAlgebra..::..SingleSparseMatrix
        Extreme.Mathematics.LinearAlgebra.Sparse..::..SingleSparseCompressedColumnMatrix

See Also

SingleSparseMatrix Members
Extreme.Mathematics.LinearAlgebra Namespace

Send comments on this topic to support@extremeoptimization.com

Copyright (c) 2004-2011 ExoAnalytics Inc.

Copyright © 2003-2013, Extreme Optimization. All rights reserved.
Extreme Optimization, Complexity made simple, M#, and M Sharp are trademarks of ExoAnalytics Inc.
Microsoft, Visual C#, Visual Basic, Visual Studio, Visual Studio.NET, and the Optimized for Visual Studio logo
are registered trademarks of Microsoft Corporation.