xerus
a general purpose tensor library
xerus::SinglePointMeasurementSet Class Reference

Class used to represent a single point measurments. More...

#include <measurments.h>

Collaboration diagram for xerus::SinglePointMeasurementSet:

Public Member Functions

 SinglePointMeasurementSet ()=default
 
 SinglePointMeasurementSet (const SinglePointMeasurementSet &_other)=default
 
 SinglePointMeasurementSet (SinglePointMeasurementSet &&_other)=default
 
void add (std::vector< size_t > _position, const value_t _measuredValue)
 
size_t degree () const
 
value_t frob_norm () const
 
void measure (const Tensor &_solution)
 
void measure (const TensorNetwork &_solution)
 
void measure (std::function< value_t(const std::vector< size_t > &)> _callback)
 
SinglePointMeasurementSetoperator= (const SinglePointMeasurementSet &_other)=default
 
SinglePointMeasurementSetoperator= (SinglePointMeasurementSet &&_other)=default
 
size_t size () const
 
void sort (const bool _positionsOnly=false)
 
double test (const Tensor &_solution) const
 
double test (const TensorNetwork &_solution) const
 
double test (std::function< value_t(const std::vector< size_t > &)> _callback) const
 

Static Public Member Functions

static SinglePointMeasurementSet random (const size_t _numMeasurements, const std::vector< size_t > &_dimensions)
 
static SinglePointMeasurementSet random (const size_t _numMeasurements, const Tensor &_solution)
 
static SinglePointMeasurementSet random (const size_t _numMeasurements, const TensorNetwork &_solution)
 
static SinglePointMeasurementSet random (const size_t _numMeasurements, const std::vector< size_t > &_dimensions, std::function< value_t(const std::vector< size_t > &)> _callback)
 

Public Attributes

std::vector< value_tmeasuredValues
 
std::vector< std::vector< size_t > > positions
 

Detailed Description

Class used to represent a single point measurments.

Definition at line 43 of file measurments.h.

Constructor & Destructor Documentation

◆ SinglePointMeasurementSet() [1/3]

xerus::SinglePointMeasurementSet::SinglePointMeasurementSet ( )
default

◆ SinglePointMeasurementSet() [2/3]

xerus::SinglePointMeasurementSet::SinglePointMeasurementSet ( const SinglePointMeasurementSet _other)
default

◆ SinglePointMeasurementSet() [3/3]

xerus::SinglePointMeasurementSet::SinglePointMeasurementSet ( SinglePointMeasurementSet &&  _other)
default

Member Function Documentation

◆ add()

void xerus::SinglePointMeasurementSet::add ( std::vector< size_t >  _position,
const value_t  _measuredValue 
)

Definition at line 83 of file measurments.cpp.

◆ degree()

size_t xerus::SinglePointMeasurementSet::degree ( ) const

Definition at line 78 of file measurments.cpp.

◆ frob_norm()

value_t xerus::SinglePointMeasurementSet::frob_norm ( ) const

Definition at line 108 of file measurments.cpp.

◆ measure() [1/3]

void xerus::SinglePointMeasurementSet::measure ( const Tensor _solution)

Definition at line 118 of file measurments.cpp.

◆ measure() [2/3]

void xerus::SinglePointMeasurementSet::measure ( const TensorNetwork _solution)

Definition at line 125 of file measurments.cpp.

◆ measure() [3/3]

void xerus::SinglePointMeasurementSet::measure ( std::function< value_t(const std::vector< size_t > &)>  _callback)

Definition at line 156 of file measurments.cpp.

◆ operator=() [1/2]

SinglePointMeasurementSet& xerus::SinglePointMeasurementSet::operator= ( const SinglePointMeasurementSet _other)
default

◆ operator=() [2/2]

SinglePointMeasurementSet& xerus::SinglePointMeasurementSet::operator= ( SinglePointMeasurementSet &&  _other)
default

◆ random() [1/4]

SinglePointMeasurementSet xerus::SinglePointMeasurementSet::random ( const size_t  _numMeasurements,
const std::vector< size_t > &  _dimensions 
)
static

Definition at line 42 of file measurments.cpp.

◆ random() [2/4]

SinglePointMeasurementSet xerus::SinglePointMeasurementSet::random ( const size_t  _numMeasurements,
const Tensor _solution 
)
static

Definition at line 50 of file measurments.cpp.

◆ random() [3/4]

SinglePointMeasurementSet xerus::SinglePointMeasurementSet::random ( const size_t  _numMeasurements,
const TensorNetwork _solution 
)
static

Definition at line 57 of file measurments.cpp.

◆ random() [4/4]

SinglePointMeasurementSet xerus::SinglePointMeasurementSet::random ( const size_t  _numMeasurements,
const std::vector< size_t > &  _dimensions,
std::function< value_t(const std::vector< size_t > &)>  _callback 
)
static

Definition at line 64 of file measurments.cpp.

◆ size()

size_t xerus::SinglePointMeasurementSet::size ( ) const

Definition at line 72 of file measurments.cpp.

◆ sort()

void xerus::SinglePointMeasurementSet::sort ( const bool  _positionsOnly = false)

Definition at line 89 of file measurments.cpp.

◆ test() [1/3]

double xerus::SinglePointMeasurementSet::test ( const Tensor _solution) const

Definition at line 164 of file measurments.cpp.

◆ test() [2/3]

double xerus::SinglePointMeasurementSet::test ( const TensorNetwork _solution) const

Definition at line 175 of file measurments.cpp.

◆ test() [3/3]

double xerus::SinglePointMeasurementSet::test ( std::function< value_t(const std::vector< size_t > &)>  _callback) const

Definition at line 210 of file measurments.cpp.

Member Data Documentation

◆ measuredValues

std::vector<value_t> xerus::SinglePointMeasurementSet::measuredValues

Definition at line 46 of file measurments.h.

◆ positions

std::vector<std::vector<size_t> > xerus::SinglePointMeasurementSet::positions

Definition at line 45 of file measurments.h.


The documentation for this class was generated from the following files: