• Articles
  • Api Documentation
Show / Hide Table of Contents
  • Paramdigma.Core
    • Convert
    • Intersect3D
    • Intersect3D.LineLineIntersectionResult
    • Intersect3D.LineLineIntersectionStatus
    • Intersect3D.LinePlaneIntersectionStatus
    • Intersect3D.RayFacePerimeterIntersectionStatus
    • Settings
  • Paramdigma.Core.Collections
    • Interval
    • Matrix<T>
  • Paramdigma.Core.Curves
    • Geodesics
    • LevelSets
  • Paramdigma.Core.Exceptions
    • UnsetGeometryException
  • Paramdigma.Core.Extensions
    • Lists
  • Paramdigma.Core.Geometry
    • BaseCurve
    • BasePoint
    • Box
    • Circle
    • Cylinder
    • Delaunay
    • InvalidCurveException
    • Line
    • Line2d
    • Mesh
    • MeshCorner
    • MeshEdge
    • MeshFace
    • MeshGeometry
    • MeshHalfEdge
    • MeshPoint
    • MeshTopology
    • MeshVertex
    • NurbsCurve
    • NurbsSurface
    • Plane
    • Point2d
    • Point3d
    • Point4d
    • Polyline
    • Polyline2d
    • Ray
    • Ray2d
    • Rectangle2d
    • Sphere
    • Torus
    • Vector2d
    • Vector3d
    • VectorNd
  • Paramdigma.Core.Geometry.Interfaces
    • ICurve
    • ISurface
    • IVector
  • Paramdigma.Core.IO
    • CsvReader
    • CsvWritter
    • OBJMeshData
    • ObjReader
    • ObjWritter
    • OffMeshData
    • OffReader
    • OffResult
    • OffWriter
  • Paramdigma.Core.LinearAlgebra
    • Complex
    • LeastSquaresLinearFit
    • Triplet
    • TripletData
  • Paramdigma.Core.Optimization
    • GradientDescent
    • GradientDescent.FitnessFunction
    • GradientDescentOptions
    • GradientDescentResult
    • KMeansCluster
    • KMeansClustering
    • KMeansClustering.IterationCompletedEventArgs
  • Paramdigma.Core.Spatial
    • DelaunayEdge
    • DelaunayPoint
    • DelaunayTriangle
    • Octree
    • PointCloud
    • PointCloudMember
    • QuadTree

Class Matrix<T>

2-Dimensional generic matrix.

Inheritance
System.Object
Matrix<T>
Namespace: Paramdigma.Core.Collections
Assembly: Paramdigma.Core.dll
Syntax
public class Matrix<T> : object
Type Parameters
Name Description
T

Type of the objects in the matrix.

Constructors

| Improve this Doc View Source

Matrix(T[,])

Initializes a new instance of the Matrix<T> class from a 2D array.

Declaration
public Matrix(T[, ] data)
Parameters
Type Name Description
T[,] data

2D array of data.

| Improve this Doc View Source

Matrix(Int32)

Initializes a new instance of the Matrix<T> class.

Declaration
public Matrix(int n)
Parameters
Type Name Description
System.Int32 n

Size of the square Matrix.

| Improve this Doc View Source

Matrix(Int32, Int32)

Initializes a new instance of the Matrix<T> class of the specified size.

Declaration
public Matrix(int n, int m)
Parameters
Type Name Description
System.Int32 n

Column size.

System.Int32 m

Row size.

Properties

| Improve this Doc View Source

Count

Gets the amount of items in this matrix.

Declaration
public int Count { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Item[Int32, Int32]

Gets a specific item in the matrix.

Declaration
public T this[int row, int column] { get; }
Parameters
Type Name Description
System.Int32 row

Row.

System.Int32 column

Column.

Property Value
Type Description
T
| Improve this Doc View Source

M

Gets rows.

Declaration
public int M { get; }
Property Value
Type Description
System.Int32

Number of rows on the Matrix.

| Improve this Doc View Source

N

Gets columns.

Declaration
public int N { get; }
Property Value
Type Description
System.Int32

Number of columns on the Matrix.

Methods

| Improve this Doc View Source

Column(Int32)

Get the column of a matrix at the specified index.

Declaration
public T[] Column(int m)
Parameters
Type Name Description
System.Int32 m

Column index.

Returns
Type Description
T[]

Matrix column as list.

| Improve this Doc View Source

FlipMatrix()

Turns columns into rows and rows into columns.

Declaration
public void FlipMatrix()
| Improve this Doc View Source

GetAllNeighboursAt(Int32, Int32)

Obtains all neighbour entities surrounding the specified matrix coordinates.

Declaration
public List<T> GetAllNeighboursAt(int column, int row)
Parameters
Type Name Description
System.Int32 column

Column location.

System.Int32 row

Row location.

Returns
Type Description
List<T>

List of all neighbour entities.

| Improve this Doc View Source

GetContiguousNeighboursAt(Int32, Int32)

Obtains contiguous neighbour entities surrounding the specified matrix coordinates.

Declaration
public List<T> GetContiguousNeighboursAt(int column, int row)
Parameters
Type Name Description
System.Int32 column

Column location.

System.Int32 row

Row location.

Returns
Type Description
List<T>

List of contiguous neighbours ( Up / Left / Down / Right ).

| Improve this Doc View Source

GetCornerNeighboursAt(Int32, Int32)

Obtains corner neighbour entities surrounding the specified matrix coordinates.

Declaration
public List<T> GetCornerNeighboursAt(int column, int row)
Parameters
Type Name Description
System.Int32 column

Column location.

System.Int32 row

Row location.

Returns
Type Description
List<T>

List of corner neighbours (Diagonally connected).

| Improve this Doc View Source

IncrementColumns(Int32)

Increment Matrix column size by a specified amount. It accepts both increasing and decreasing the size.

Declaration
public void IncrementColumns(int incrementN)
Parameters
Type Name Description
System.Int32 incrementN

Positive or negative increment.

| Improve this Doc View Source

IncrementMatrixSize(Int32)

Increase or decrease the matrix size symetrically.

Declaration
public void IncrementMatrixSize(int symetricIncrement)
Parameters
Type Name Description
System.Int32 symetricIncrement

Symetric increase/decrease.

| Improve this Doc View Source

IncrementMatrixSize(Int32, Int32)

Increase or decrease the column size of the matrix.

Declaration
public void IncrementMatrixSize(int columnIncrement, int rowIncrement)
Parameters
Type Name Description
System.Int32 columnIncrement

Column increment.

System.Int32 rowIncrement

Row increment.

| Improve this Doc View Source

IncrementRows(Int32)

Increment Matrix row size by a specified amount. It accepts both increasing and decreasing the size.

Declaration
public void IncrementRows(int incrementM)
Parameters
Type Name Description
System.Int32 incrementM

Positive or negative increment.

| Improve this Doc View Source

Row(Int32)

Get the row of a matrix at the specified index.

Declaration
public T[] Row(int n)
Parameters
Type Name Description
System.Int32 n

Row index.

Returns
Type Description
T[]

Matrix row as list.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX