preCICE v3.2.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
precice::time::SampleResult Class Reference

#include <SampleResult.hpp>

Public Member Functions

 SampleResult (const Eigen::VectorXd &ref) noexcept
 Creates a non-owning SampleResult.
 
 SampleResult (Eigen::VectorXd &&vec)
 Creates an owning SampleResult.
 
 SampleResult (const SampleResult &other)=delete
 
SampleResultoperator= (const SampleResult &other)=delete
 
 SampleResult (SampleResult &&other)=default
 
SampleResultoperator= (SampleResult &&other)=default
 
Eigen::Map< const Eigen::VectorXd > values () const noexcept
 Access the values as a vector.
 
auto operator() (Eigen::Index index) const
 Direct read-access to a value in the underlying view.
 

Private Attributes

Eigen::VectorXd _owned
 
Eigen::Map< const Eigen::VectorXd > _view
 

Detailed Description

Result of a sampling operation which is optionally owning.

This covers two cases:

  1. The sampling operation doesn't need to interpolate and returns a view into an existing sample.
  2. The sampling operation needs to interpolate values and returns them as part of the object and exposes a view into it.

Definition at line 14 of file SampleResult.hpp.

Constructor & Destructor Documentation

◆ SampleResult() [1/4]

precice::time::SampleResult::SampleResult ( const Eigen::VectorXd & ref)
inlinenoexcept

Creates a non-owning SampleResult.

Definition at line 17 of file SampleResult.hpp.

◆ SampleResult() [2/4]

precice::time::SampleResult::SampleResult ( Eigen::VectorXd && vec)
inline

Creates an owning SampleResult.

Definition at line 21 of file SampleResult.hpp.

◆ SampleResult() [3/4]

precice::time::SampleResult::SampleResult ( const SampleResult & other)
delete

◆ SampleResult() [4/4]

precice::time::SampleResult::SampleResult ( SampleResult && other)
default

Member Function Documentation

◆ operator()()

auto precice::time::SampleResult::operator() ( Eigen::Index index) const
inline

Direct read-access to a value in the underlying view.

Definition at line 39 of file SampleResult.hpp.

◆ operator=() [1/2]

SampleResult & precice::time::SampleResult::operator= ( const SampleResult & other)
delete

◆ operator=() [2/2]

SampleResult & precice::time::SampleResult::operator= ( SampleResult && other)
default

◆ values()

Eigen::Map< const Eigen::VectorXd > precice::time::SampleResult::values ( ) const
inlinenoexcept

Access the values as a vector.

Definition at line 33 of file SampleResult.hpp.

Member Data Documentation

◆ _owned

Eigen::VectorXd precice::time::SampleResult::_owned
private

Definition at line 45 of file SampleResult.hpp.

◆ _view

Eigen::Map<const Eigen::VectorXd> precice::time::SampleResult::_view
private

Definition at line 46 of file SampleResult.hpp.


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