C# 클래스 SimShift.Map.Splines.TriDiagonalMatrixF

A tri-diagonal matrix has non-zero entries only on the main diagonal, the diagonal above the main (super), and the diagonal below the main (sub).

This is based on the wikipedia article: http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm

The entries in the matrix on a particular row are A[i], B[i], and C[i] where i is the row index. B is the main diagonal, and so for an NxN matrix B is length N and all elements are used. So for row 0, the first two values are B[0] and C[0]. And for row N-1, the last two values are A[N-1] and B[N-1]. That means that A[0] is not actually on the matrix and is therefore never used, and same with C[N-1].

파일 보기 프로젝트 열기: nlhans/SimShift 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
A float[]
B float[]
C float[]

공개 메소드들

메소드 설명
Solve ( float d ) : float[]

Solve the system of equations this*x=d given the specified d.

Uses the Thomas algorithm described in the wikipedia article: http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm Not optimized. Not destructive.

ToDisplayString ( string fmt = "", string prefix = "" ) : string

Produce a string representation of the contents of this matrix.

TriDiagonalMatrixF ( int n ) : System

Construct an NxN matrix.

this ( int row, int col ) : float

Indexer. Setter throws an exception if you try to set any not on the super, main, or sub diagonals.

메소드 상세

Solve() 공개 메소드

Solve the system of equations this*x=d given the specified d.
Uses the Thomas algorithm described in the wikipedia article: http://en.wikipedia.org/wiki/Tridiagonal_matrix_algorithm Not optimized. Not destructive.
public Solve ( float d ) : float[]
d float Right side of the equation.
리턴 float[]

ToDisplayString() 공개 메소드

Produce a string representation of the contents of this matrix.
public ToDisplayString ( string fmt = "", string prefix = "" ) : string
fmt string Optional. For String.Format. Must include the colon. Examples are ':0.000' and ',5:0.00'
prefix string Optional. Per-line indentation prefix.
리턴 string

TriDiagonalMatrixF() 공개 메소드

Construct an NxN matrix.
public TriDiagonalMatrixF ( int n ) : System
n int
리턴 System

this() 공개 메소드

Indexer. Setter throws an exception if you try to set any not on the super, main, or sub diagonals.
public this ( int row, int col ) : float
row int
col int
리턴 float

프로퍼티 상세

A 공개적으로 프로퍼티

The values for the sub-diagonal. A[0] is never used.
public float[] A
리턴 float[]

B 공개적으로 프로퍼티

The values for the main diagonal.
public float[] B
리턴 float[]

C 공개적으로 프로퍼티

The values for the super-diagonal. C[C.Length-1] is never used.
public float[] C
리턴 float[]