AXOM
Axom provides a robust, flexible software infrastructure for the development of multi-physics applications and computational tools.
axom::sina::CurveSet Class Reference

A CurveSet represents an entry in a record's "curve_set". More...

#include </home/docs/checkouts/readthedocs.org/user_builds/axom/checkouts/develop/src/axom/sina/core/CurveSet.hpp>

Classes

struct  curveNodeInfo
 

Public Types

enum class  CurveOrder {
  REGISTRATION_OLDEST_FIRST = 0 , REGISTRATION_NEWEST_FIRST = 1 , ALPHABETIC = 2 , REVERSE_ALPHABETIC = 3 ,
  ALPHABETICAL = 2 , REVERSE_ALPHABETICAL = 3
}
 
using CurveMap = std::unordered_map< std::string, Curve >
 

Public Member Functions

 CurveSet (std::string name)
 Create a CurveSet with the given name. More...
 
 CurveSet (std::string name, conduit::Node const &node)
 Create a CurveSet from the given Conduit node. More...
 
std::string const & getName () const
 Get the name of the this CurveSet. More...
 
std::vector< std::string > const & getOrderedIndependentCurveNames ()
 
std::vector< std::string > const & getOrderedDependentCurveNames ()
 
bool applyCustomIndependentCurveOrder (const std::vector< std::string > newOrderedCurveNames)
 
bool applyCustomDependentCurveOrder (const std::vector< std::string > newOrderedCurveNames)
 
void addIndependentCurve (Curve curve)
 Add an independent curve. More...
 
void addDependentCurve (Curve curve)
 Add a dependent curve. More...
 
CurveMap const & getIndependentCurves () const
 Get a map of all the independent curves. More...
 
CurveMap const & getDependentCurves () const
 Get a map of all the dependent curves. More...
 
conduit::Node toNode () const
 Convert this CurveSet to a Conduit node. More...
 
conduit::Node toNode (CurveOrder curveOrder) const
 

Detailed Description

A CurveSet represents an entry in a record's "curve_set".

A CurveSet consist of a set of independent and dependent curves. Each curve is a list of numbers along with optional units and tags.

See also
Record
Curve

Member Typedef Documentation

◆ CurveMap

using axom::sina::CurveSet::CurveMap = std::unordered_map<std::string, Curve>

An unordered map of Curve objects.

Member Enumeration Documentation

◆ CurveOrder

An enum representing supported orderings for curves within a CurveSet.

Enumerator
REGISTRATION_OLDEST_FIRST 
REGISTRATION_NEWEST_FIRST 
ALPHABETIC 
REVERSE_ALPHABETIC 
ALPHABETICAL 
REVERSE_ALPHABETICAL 

Constructor & Destructor Documentation

◆ CurveSet() [1/2]

axom::sina::CurveSet::CurveSet ( std::string  name)
explicit

Create a CurveSet with the given name.

Parameters
namethe name of the CurveSet

◆ CurveSet() [2/2]

axom::sina::CurveSet::CurveSet ( std::string  name,
conduit::Node const &  node 
)

Create a CurveSet from the given Conduit node.

Parameters
namethe name of the CurveSet
nodethe Conduit node representing the CurveSet

Member Function Documentation

◆ getName()

std::string const& axom::sina::CurveSet::getName ( ) const
inline

Get the name of the this CurveSet.

Returns
the curve set's name

◆ getOrderedIndependentCurveNames()

std::vector<std::string> const& axom::sina::CurveSet::getOrderedIndependentCurveNames ( )
inline

Get the insertion order of this curveset's independents.

Returns
a vector of curve names in the order of insertion.

◆ getOrderedDependentCurveNames()

std::vector<std::string> const& axom::sina::CurveSet::getOrderedDependentCurveNames ( )
inline

Get the insertion order of this curveset's dependents.

Returns
a vector of curve names in the order of insertion.

◆ applyCustomIndependentCurveOrder()

bool axom::sina::CurveSet::applyCustomIndependentCurveOrder ( const std::vector< std::string >  newOrderedCurveNames)

Set the insertion order of this curveset's independents.

Note that this overwrites the INSERTION ORDER, meaning this is treated as the new "oldest first".

Returns
a bool for whether the reorder went through. Name lists must match exactly

◆ applyCustomDependentCurveOrder()

bool axom::sina::CurveSet::applyCustomDependentCurveOrder ( const std::vector< std::string >  newOrderedCurveNames)

Set the insertion order of this curveset's independents.

Note that this overwrites the INSERTION ORDER, meaning this is treated as the new "oldest first".

Returns
a bool for whether the reorder went through. Name lists must match exactly

◆ addIndependentCurve()

void axom::sina::CurveSet::addIndependentCurve ( Curve  curve)

Add an independent curve.

Parameters
curvethe curve to add

◆ addDependentCurve()

void axom::sina::CurveSet::addDependentCurve ( Curve  curve)

Add a dependent curve.

Parameters
curvethe curve to add

◆ getIndependentCurves()

CurveMap const& axom::sina::CurveSet::getIndependentCurves ( ) const
inline

Get a map of all the independent curves.

Returns
a map of all the independent curves

◆ getDependentCurves()

CurveMap const& axom::sina::CurveSet::getDependentCurves ( ) const
inline

Get a map of all the dependent curves.

Returns
a map of all the dependent curves

◆ toNode() [1/2]

conduit::Node axom::sina::CurveSet::toNode ( ) const

Convert this CurveSet to a Conduit node.

Parameters
curveOrderThe order to add curves to the node in. Ex: registration vs alphabetic
Returns
the Node representation of this CurveSet

◆ toNode() [2/2]

conduit::Node axom::sina::CurveSet::toNode ( CurveOrder  curveOrder) const

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