C# 클래스 EncryptionAlgorithms.MatrixClass

Classes Contained: MatrixClass (version 1.1) MatrixClassException Fraction (Version 2.0) FractionException
파일 보기 프로젝트 열기: Omar-Salem/Classical-Encryption-Techniques 1 사용 예제들

공개 메소드들

메소드 설명
AddRow ( int iTargetRow, int iSecondRow, Fraction iMultiple ) : void

The function adds two rows for current MatrixClass object It performs the following calculation: iTargetRow = iTargetRow + iMultiple*iSecondRow

Adjoint ( int b ) : MatrixClass

The function returns the adjoint of the current MatrixClass

Concatenate ( MatrixClass MatrixClass1, MatrixClass MatrixClass2 ) : MatrixClass

The function concatenates the two given matrices column-wise it can be helpful in a equation solver class where the augmented MatrixClass is obtained by concatenation

Determinent ( ) : Fraction

The function returns the determinent of the current MatrixClass object as Fraction It computes the determinent in the traditional way (i.e. using minors) It can be much slower(due to recursion) if the given MatrixClass has order greater than 6 Try using DeterminentFast() function if the order of MatrixClass is greater than 6

DeterminentFast ( ) : Fraction

The function returns the determinent of the current MatrixClass object as Fraction It computes the determinent by reducing the MatrixClass to reduced echelon form using row operations The function is very fast and efficient but may raise overflow exceptions in some cases. In such cases use the Determinent() function which computes determinent in the traditional manner(by using minors)

Duplicate ( ) : MatrixClass

The function duplicates the current MatrixClass object

EchelonForm ( ) : MatrixClass

The function returns the Echelon form of the current MatrixClass

IdentityMatrixClass ( int iRows, int iCols ) : MatrixClass

The function returns an identity MatrixClass of dimensions ( Row x Col )

InterchangeRow ( int iRow1, int iRow2 ) : void

The function interchanges two rows of the current MatrixClass object

Inverse ( ) : MatrixClass

The function returns the inverse of the current MatrixClass in the traditional way(by adjoint method) It can be much slower if the given MatrixClass has order greater than 6 Try using InverseFast() function if the order of MatrixClass is greater than 6

InverseFast ( ) : MatrixClass

The function returns the inverse of the current MatrixClass using Reduced Echelon Form method The function is very fast and efficient but may raise overflow exceptions in some cases. In such cases use the Inverse() method which computes inverse in the traditional way(using adjoint).

MatrixClass ( Fraction elements ) : System

Constructors

MatrixClass ( double elements ) : System
MatrixClass ( int elements ) : System
MatrixClass ( int iRows, int iCols ) : System
Minor ( MatrixClass MatrixClass, int iRow, int iCol ) : MatrixClass

The function return the Minor of element[Row,Col] of a MatrixClass object

MultiplyRow ( int iRow, Fraction frac ) : void

The function multiplies the given row of the current MatrixClass object by a Fraction

MultiplyRow ( int iRow, double dbl ) : void

The function multiplies the given row of the current MatrixClass object by a double

MultiplyRow ( int iRow, int iNo ) : void

The function multiplies the given row of the current MatrixClass object by an integer

NullMatrixClass ( int iRows, int iCols ) : MatrixClass

The function returns a Null MatrixClass of dimension ( Row x Col )

ReducedEchelonForm ( ) : MatrixClass

The function returns the reduced echelon form of the current MatrixClass

ScalarMatrixClass ( int iRows, int iCols, int K ) : MatrixClass

The function returns a Scalar MatrixClass of dimension ( Row x Col ) and scalar K

ToString ( ) : string

The function returns the current MatrixClass object as a string

Transpose ( ) : MatrixClass

The function returns the transpose of the current MatrixClass

UnitMatrixClass ( int iRows, int iCols ) : MatrixClass

The function returns a Unit MatrixClass of dimension ( Row x Col )

operator ( ) : MatrixClass
this ( int iRow, int iCol ) : Fraction

Indexer

비공개 메소드들

메소드 설명
Add ( MatrixClass MatrixClass1, MatrixClass MatrixClass2 ) : MatrixClass
Determinent ( MatrixClass MatrixClass ) : Fraction

The helper function for the above Determinent() method it calls itself recursively and computes determinent using minors

FindB ( int Det ) : int
GetElement ( int iRow, int iCol ) : Fraction

Internal functions for getting/setting values

Multiply ( MatrixClass MatrixClass, Fraction frac ) : MatrixClass
Multiply ( MatrixClass MatrixClass1, MatrixClass MatrixClass2 ) : MatrixClass
Multiply ( MatrixClass MatrixClass, int iNo ) : MatrixClass
Negate ( MatrixClass MatrixClass ) : MatrixClass

Internal Fucntions for the above operators

SetElement ( int iRow, int iCol, Fraction value ) : void

메소드 상세

AddRow() 공개 메소드

The function adds two rows for current MatrixClass object It performs the following calculation: iTargetRow = iTargetRow + iMultiple*iSecondRow
public AddRow ( int iTargetRow, int iSecondRow, Fraction iMultiple ) : void
iTargetRow int
iSecondRow int
iMultiple Fraction
리턴 void

Adjoint() 공개 메소드

The function returns the adjoint of the current MatrixClass
public Adjoint ( int b ) : MatrixClass
b int
리턴 MatrixClass

Concatenate() 공개 정적인 메소드

The function concatenates the two given matrices column-wise it can be helpful in a equation solver class where the augmented MatrixClass is obtained by concatenation
public static Concatenate ( MatrixClass MatrixClass1, MatrixClass MatrixClass2 ) : MatrixClass
MatrixClass1 MatrixClass
MatrixClass2 MatrixClass
리턴 MatrixClass

Determinent() 공개 메소드

The function returns the determinent of the current MatrixClass object as Fraction It computes the determinent in the traditional way (i.e. using minors) It can be much slower(due to recursion) if the given MatrixClass has order greater than 6 Try using DeterminentFast() function if the order of MatrixClass is greater than 6
public Determinent ( ) : Fraction
리턴 Fraction

DeterminentFast() 공개 메소드

The function returns the determinent of the current MatrixClass object as Fraction It computes the determinent by reducing the MatrixClass to reduced echelon form using row operations The function is very fast and efficient but may raise overflow exceptions in some cases. In such cases use the Determinent() function which computes determinent in the traditional manner(by using minors)
public DeterminentFast ( ) : Fraction
리턴 Fraction

Duplicate() 공개 메소드

The function duplicates the current MatrixClass object
public Duplicate ( ) : MatrixClass
리턴 MatrixClass

EchelonForm() 공개 메소드

The function returns the Echelon form of the current MatrixClass
public EchelonForm ( ) : MatrixClass
리턴 MatrixClass

IdentityMatrixClass() 공개 정적인 메소드

The function returns an identity MatrixClass of dimensions ( Row x Col )
public static IdentityMatrixClass ( int iRows, int iCols ) : MatrixClass
iRows int
iCols int
리턴 MatrixClass

InterchangeRow() 공개 메소드

The function interchanges two rows of the current MatrixClass object
public InterchangeRow ( int iRow1, int iRow2 ) : void
iRow1 int
iRow2 int
리턴 void

Inverse() 공개 메소드

The function returns the inverse of the current MatrixClass in the traditional way(by adjoint method) It can be much slower if the given MatrixClass has order greater than 6 Try using InverseFast() function if the order of MatrixClass is greater than 6
public Inverse ( ) : MatrixClass
리턴 MatrixClass

InverseFast() 공개 메소드

The function returns the inverse of the current MatrixClass using Reduced Echelon Form method The function is very fast and efficient but may raise overflow exceptions in some cases. In such cases use the Inverse() method which computes inverse in the traditional way(using adjoint).
public InverseFast ( ) : MatrixClass
리턴 MatrixClass

MatrixClass() 공개 메소드

Constructors
public MatrixClass ( Fraction elements ) : System
elements Fraction
리턴 System

MatrixClass() 공개 메소드

public MatrixClass ( double elements ) : System
elements double
리턴 System

MatrixClass() 공개 메소드

public MatrixClass ( int elements ) : System
elements int
리턴 System

MatrixClass() 공개 메소드

public MatrixClass ( int iRows, int iCols ) : System
iRows int
iCols int
리턴 System

Minor() 공개 정적인 메소드

The function return the Minor of element[Row,Col] of a MatrixClass object
public static Minor ( MatrixClass MatrixClass, int iRow, int iCol ) : MatrixClass
MatrixClass MatrixClass
iRow int
iCol int
리턴 MatrixClass

MultiplyRow() 공개 메소드

The function multiplies the given row of the current MatrixClass object by a Fraction
public MultiplyRow ( int iRow, Fraction frac ) : void
iRow int
frac Fraction
리턴 void

MultiplyRow() 공개 메소드

The function multiplies the given row of the current MatrixClass object by a double
public MultiplyRow ( int iRow, double dbl ) : void
iRow int
dbl double
리턴 void

MultiplyRow() 공개 메소드

The function multiplies the given row of the current MatrixClass object by an integer
public MultiplyRow ( int iRow, int iNo ) : void
iRow int
iNo int
리턴 void

NullMatrixClass() 공개 정적인 메소드

The function returns a Null MatrixClass of dimension ( Row x Col )
public static NullMatrixClass ( int iRows, int iCols ) : MatrixClass
iRows int
iCols int
리턴 MatrixClass

ReducedEchelonForm() 공개 메소드

The function returns the reduced echelon form of the current MatrixClass
public ReducedEchelonForm ( ) : MatrixClass
리턴 MatrixClass

ScalarMatrixClass() 공개 정적인 메소드

The function returns a Scalar MatrixClass of dimension ( Row x Col ) and scalar K
public static ScalarMatrixClass ( int iRows, int iCols, int K ) : MatrixClass
iRows int
iCols int
K int
리턴 MatrixClass

ToString() 공개 메소드

The function returns the current MatrixClass object as a string
public ToString ( ) : string
리턴 string

Transpose() 공개 메소드

The function returns the transpose of the current MatrixClass
public Transpose ( ) : MatrixClass
리턴 MatrixClass

UnitMatrixClass() 공개 정적인 메소드

The function returns a Unit MatrixClass of dimension ( Row x Col )
public static UnitMatrixClass ( int iRows, int iCols ) : MatrixClass
iRows int
iCols int
리턴 MatrixClass

operator() 공개 정적인 메소드

public static operator ( ) : MatrixClass
리턴 MatrixClass

this() 공개 메소드

Indexer
public this ( int iRow, int iCol ) : Fraction
iRow int
iCol int
리턴 Fraction