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

# sc\_RefSCVector(3)

The RefSCVector class is a smart pointer to an SCVector specialization.

## NAME

sc::RefSCVector - The **RefSCVector** class is a smart pointer to an **SCVector** specialization.

## SYNOPSIS

`#include <matrix.h>`

Inherits **sc::Ref\< SCVector \>**.

### Public Member Functions

**RefSCVector** ()\
 Initializes the vector pointer to 0.  **RefSCVector** (const **RefSCVector** &v)\
 Make this and v refer to the same **SCVector**.  **RefSCVector** (**SCVector** \*v)\
 Make this refer to v.  **RefSCVector** & **operator=** (**SCVector** \*v)\
 Make this refer to v.  **RefSCVector** & **operator=** (const **RefSCVector** &v)\
 Make this and v refer to the same **SCVector**.  **RefSCVector** (const **RefSCDimension** &dim, const **Ref**\< **SCMatrixKit** \> &)\
 Create a vector with dimension dim.  **SCVectordouble** **operator()** (int) const\
 Return an l-value that can be used to assign or retrieve an element.  **SCVectordouble** **operator\[\]** (int) const\
 Return an l-value that can be used to assign or retrieve an element.  **RefSCVector** **operator+** (const **RefSCVector** &a) const\
 Add two vectors.  **RefSCVector** **operator-** (const **RefSCVector** &a) const\
 Subtract two vectors.  **RefSCVector** **operator\*** (double) const\
 Scale a vector.  **RefSCMatrix** **outer\_product** (const **RefSCVector** &v) const\
 Return the outer product between this and v.  **RefSymmSCMatrix** **symmetric\_outer\_product** () const\
 The outer product of this with itself is a symmetric matrix.  void **set\_element** (int i, double val) const\
 void **accumulate\_element** (int i, double val) const\
 double **get\_element** (int) const\
 int **n** () const\
 **RefSCDimension** **dim** () const\
 **Ref**\< **SCMatrixKit** \> **kit** () const\
 **RefSCVector** **clone** () const\
 **RefSCVector** **copy** () const\
 double **maxabs** () const\
 double **scalar\_product** (const **RefSCVector** &) const\
 double **dot** (const **RefSCVector** &) const\
 void **normalize** () const\
 void **randomize** () const\
 void **assign** (const **RefSCVector** &v) const\
 void **assign** (double val) const\
 void **assign** (const double \*v) const\
 void **convert** (double \*) const\
 void **scale** (double val) const\
 void **accumulate** (const **RefSCVector** &v) const\
 void **accumulate\_product** (const **RefSymmSCMatrix** &, const **RefSCVector** &)\
 void **accumulate\_product** (const **RefSCMatrix** &, const **RefSCVector** &)\
 void **element\_op** (const **Ref**\< **SCElementOp** \> &op) const\
 void **element\_op** (const **Ref**\< **SCElementOp2** \> &, const **RefSCVector** &) const\
 void **element\_op** (const **Ref**\< **SCElementOp3** \> &, const **RefSCVector** &, const **RefSCVector** &) const\
 void **print** (std::ostream &out) const\
 void **print** (const char \*title=0, std::ostream &out=**ExEnv::out0**(), int precision=10) const\
 void **save** (**StateOut** &)\
 void **restore** (**StateIn** &)\
 Restores the matrix from **StateIn** object. The vector must have been initialized already.

### Additional Inherited Members

## Detailed Description

The **RefSCVector** class is a smart pointer to an **SCVector** specialization.

## Constructor & Destructor Documentation

### sc::RefSCVector::RefSCVector ()

Initializes the vector pointer to 0. The reference must be initialized before it is used.

### sc::RefSCVector::RefSCVector (const RefSCDimension & dim, const Ref\< SCMatrixKit \> &)

Create a vector with dimension dim. The data values are undefined.

## Author

Generated automatically by Doxygen for MPQC from the source code.
