NEML2 2.0.0
Loading...
Searching...
No Matches
TraceableSize Struct Reference

Traceable size. More...

Detailed Description

Traceable size.

Similar to neml2::TraceableTensorShape, but only for a single dimension.

See also
neml2::TraceableTensorShape

#include <TraceableSize.h>

Inheritance diagram for TraceableSize:

Public Member Functions

const ATensortraceable () const noexcept
 
Size concrete () const
 
ATensor as_tensor () const
 
Scalar as_scalar () const
 

Member Function Documentation

◆ as_scalar()

Scalar as_scalar ( ) const
Returns
the size as a neml2::Scalar

◆ as_tensor()

ATensor as_tensor ( ) const
Returns
the size represented as a scalar tensor (possibly traceable)

◆ concrete()

Size concrete ( ) const
Returns
the concrete size (without any traceable information)

◆ traceable()

const ATensor * traceable ( ) const
noexcept
Returns
a pointer to the ATensor representing the traceable size if it is traceable, otherwise a nullptr