Skip to content

Enhancements in CSRMatrix #264

@vickysharma0812

Description

@vickysharma0812

Sparse info

Add following data to CSRMatrix_ field:

  • max_nnz_in_row Maximum number of non zero entries in a row

  • max_nnz_in_col Maximum number of non zero entries in a col

  • Add a method to get the bandwidth of the sparse matrix, which is defined as:

$$ m_{l} = max( \left [(i-j); a(i,j) \ne 0 \right ]) $$

$$ m_{u} = max( (j-i); a(i,j) \ne 0 ) $$

where,

  • $m_l$ is the bandwidth of the strict lower part of A.
  • $m_u$ is the bandwidth of the strict upper part of A.

Get compact row

  • Add methods to get compact row of a CSR matrix

Matrix vector multiplication:

Currently, we are using Sparsekit lib for matvec.

Instead Add following methods

  • amux : A times a vector. Compressed Sparse Row (CSR) format.
  • atmux : Transp(A) times a vector. CSR format.
  • atmuxr: Transp(A) times a vector. CSR format. A rectangular.
  • amuxms: A times a vector. Modified Compress Sparse Row format.
  • B = scale * A by using Set(obj, value, scale)
  • C = A + B
  • C = A + scale * B

Others

  • Implement GetDia method, currently we are using Sparsekit for this purpose.

Misc

Metadata

Metadata

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions