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

#include <measurments.h>

Collaboration diagram for xerus::RankOneMeasurementSet:

Public Member Functions

 RankOneMeasurementSet ()=default
 
 RankOneMeasurementSet (const RankOneMeasurementSet &_other)=default
 
 RankOneMeasurementSet (RankOneMeasurementSet &&_other)=default
 
 RankOneMeasurementSet (const SinglePointMeasurementSet &_other, const std::vector< size_t > &_dimensions)
 
void add (const std::vector< Tensor > &_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< Tensor > &)> _callback)
 
void normalize ()
 
RankOneMeasurementSetoperator= (const RankOneMeasurementSet &_other)=default
 
RankOneMeasurementSetoperator= (RankOneMeasurementSet &&_other)=default
 
size_t size () const
 
void sort (const bool _positionsOnly)
 
double test (const Tensor &_solution) const
 
double test (const TensorNetwork &_solution) const
 
double test (std::function< value_t(const std::vector< Tensor > &)> _callback) const
 

Static Public Member Functions

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

Public Attributes

std::vector< value_tmeasuredValues
 
std::vector< std::vector< Tensor > > positions
 

Detailed Description

Definition at line 94 of file measurments.h.

Constructor & Destructor Documentation

◆ RankOneMeasurementSet() [1/4]

xerus::RankOneMeasurementSet::RankOneMeasurementSet ( )
default

◆ RankOneMeasurementSet() [2/4]

xerus::RankOneMeasurementSet::RankOneMeasurementSet ( const RankOneMeasurementSet _other)
default

◆ RankOneMeasurementSet() [3/4]

xerus::RankOneMeasurementSet::RankOneMeasurementSet ( RankOneMeasurementSet &&  _other)
default

◆ RankOneMeasurementSet() [4/4]

xerus::RankOneMeasurementSet::RankOneMeasurementSet ( const SinglePointMeasurementSet _other,
const std::vector< size_t > &  _dimensions 
)

Definition at line 258 of file measurments.cpp.

Member Function Documentation

◆ add()

void xerus::RankOneMeasurementSet::add ( const std::vector< Tensor > &  _position,
const value_t  _measuredValue 
)

Definition at line 313 of file measurments.cpp.

◆ degree()

size_t xerus::RankOneMeasurementSet::degree ( ) const

Definition at line 309 of file measurments.cpp.

◆ frob_norm()

value_t xerus::RankOneMeasurementSet::frob_norm ( ) const

Definition at line 360 of file measurments.cpp.

◆ measure() [1/3]

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

Definition at line 370 of file measurments.cpp.

◆ measure() [2/3]

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

Definition at line 397 of file measurments.cpp.

◆ measure() [3/3]

void xerus::RankOneMeasurementSet::measure ( std::function< value_t(const std::vector< Tensor > &)>  _callback)

Definition at line 429 of file measurments.cpp.

◆ normalize()

void xerus::RankOneMeasurementSet::normalize ( )

Definition at line 349 of file measurments.cpp.

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ random() [1/4]

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

Definition at line 273 of file measurments.cpp.

◆ random() [2/4]

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

Definition at line 281 of file measurments.cpp.

◆ random() [3/4]

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

Definition at line 288 of file measurments.cpp.

◆ random() [4/4]

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

Definition at line 295 of file measurments.cpp.

◆ size()

size_t xerus::RankOneMeasurementSet::size ( ) const

Definition at line 303 of file measurments.cpp.

◆ sort()

void xerus::RankOneMeasurementSet::sort ( const bool  _positionsOnly)

Definition at line 330 of file measurments.cpp.

◆ test() [1/3]

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

Definition at line 437 of file measurments.cpp.

◆ test() [2/3]

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

Definition at line 470 of file measurments.cpp.

◆ test() [3/3]

double xerus::RankOneMeasurementSet::test ( std::function< value_t(const std::vector< Tensor > &)>  _callback) const

Definition at line 510 of file measurments.cpp.

Member Data Documentation

◆ measuredValues

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

Definition at line 97 of file measurments.h.

◆ positions

std::vector<std::vector<Tensor> > xerus::RankOneMeasurementSet::positions

Definition at line 96 of file measurments.h.


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