---
name: "sc_ReplDiagSCMatrix"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_ReplDiagSCMatrix"
---

# sc\_ReplDiagSCMatrix(3)

## NAME

sc::ReplDiagSCMatrix

## SYNOPSIS

Inherits **sc::DiagSCMatrix**.

### Public Member Functions

**ReplDiagSCMatrix** (const **RefSCDimension** &, **ReplSCMatrixKit** \*)\
 void **assign\_val** (double)\
 Overridden to implement the assign members.  double **get\_element** (int) const\
 Return or modify an element.  void **set\_element** (int, double)\
 void **accumulate\_element** (int, double)\
 void **accumulate** (const **DiagSCMatrix** \*)\
 Sum m into this.  double **invert\_this** ()\
 Invert this.  double **determ\_this** ()\
 Return the determinant of this. this is overwritten.  double **trace** ()\
 Return the trace.  void **gen\_invert\_this** ()\
 Do a generalized inversion of this.  void **element\_op** (const **Ref**\< **SCElementOp** \> &)\
 Perform the element operation op on each element of this.  void **element\_op** (const **Ref**\< **SCElementOp2** \> &, **DiagSCMatrix** \*)\
 void **element\_op** (const **Ref**\< **SCElementOp3** \> &, **DiagSCMatrix** \*, **DiagSCMatrix** \*)\
 void **vprint** (const char \*title=0, std::ostream &out=**ExEnv::out0**(), int=10) const\
 double \* **get\_data** ()\
 **Ref**\< **SCMatrixSubblockIter** \> **local\_blocks** (SCMatrixSubblockIter::Access)\
 Returns iterators for the local (rapidly accessible) blocks used in this matrix.  **Ref**\< **SCMatrixSubblockIter** \> **all\_blocks** (SCMatrixSubblockIter::Access)\
 Returns iterators for the all blocks used in this matrix.  **Ref**\< **ReplSCMatrixKit** \> **skit** ()\

### Protected Member Functions

void **init\_blocklist** ()\
 void **before\_elemop** ()\
 void **after\_elemop** ()\

### Protected Attributes

**Ref**\< **SCMatrixBlockList** \> **blocklist**\
 double \* **matrix**\

### Friends

class **ReplSCMatrix**\
 class **ReplSymmSCMatrix**\
 class **ReplSCVector**\

## Member Function Documentation

### void sc::ReplDiagSCMatrix::accumulate (const DiagSCMatrix \* m)` [virtual]`

Sum m into this.

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::accumulate\_element (int, double)` [virtual]`

Implements **sc::DiagSCMatrix**.

### Ref\< SCMatrixSubblockIter \> sc::ReplDiagSCMatrix::all\_blocks (SCMatrixSubblockIter::Access)` [virtual]`

Returns iterators for the all blocks used in this matrix.

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::assign\_val (double val)` [virtual]`

Overridden to implement the assign members.

Reimplemented from **sc::DiagSCMatrix**.

### double sc::ReplDiagSCMatrix::determ\_this ()` [virtual]`

Return the determinant of this. this is overwritten.

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::element\_op (const Ref\< SCElementOp \> &)` [virtual]`

Perform the element operation op on each element of this.

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::element\_op (const Ref\< SCElementOp2 \> &, DiagSCMatrix \*)` [virtual]`

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::element\_op (const Ref\< SCElementOp3 \> &, DiagSCMatrix \*, DiagSCMatrix \*)` [virtual]`

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::gen\_invert\_this ()` [virtual]`

Do a generalized inversion of this.

Implements **sc::DiagSCMatrix**.

### double sc::ReplDiagSCMatrix::get\_element (int) const` [virtual]`

Return or modify an element.

Implements **sc::DiagSCMatrix**.

### double sc::ReplDiagSCMatrix::invert\_this ()` [virtual]`

Invert this.

Implements **sc::DiagSCMatrix**.

### Ref\< SCMatrixSubblockIter \> sc::ReplDiagSCMatrix::local\_blocks (SCMatrixSubblockIter::Access)` [virtual]`

Returns iterators for the local (rapidly accessible) blocks used in this matrix.

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::set\_element (int, double)` [virtual]`

Implements **sc::DiagSCMatrix**.

### double sc::ReplDiagSCMatrix::trace ()` [virtual]`

Return the trace.

Implements **sc::DiagSCMatrix**.

### void sc::ReplDiagSCMatrix::vprint (const char \* title = `0`, std::ostream & out = ExEnv::out0`()`, int = `10`) const` [virtual]`

Reimplemented from **sc::DiagSCMatrix**.

## Author

Generated automatically by Doxygen for MPQC from the source code.
