NEML2 2.1.0
Loading...
Searching...
No Matches

#include <MultiColumnCSVScalar.h>

Inheritance diagram for MultiColumnCSVScalar:

Public Member Functions

 MultiColumnCSVScalar (const OptionSet &options)
Public Member Functions inherited from UserTensorBase< Scalar >
 UserTensorBase (const OptionSet &options)
void setup () override
 Setup this object.
Public Member Functions inherited from NEML2Object
 NEML2Object ()=delete
 NEML2Object (NEML2Object &&)=delete
 NEML2Object (const NEML2Object &)=delete
NEML2Objectoperator= (NEML2Object &&)=delete
NEML2Objectoperator= (const NEML2Object &)=delete
virtual ~NEML2Object ()=default
 NEML2Object (const OptionSet &options)
 Construct a new NEML2Object object.
const OptionSetinput_options () const
const std::string & name () const
 A readonly reference to the object's name.
const std::string & type () const
 A readonly reference to the object's type.
const std::string & path () const
 A readonly reference to the object's path.
const std::string & doc () const
 A readonly reference to the object's docstring.
Factoryfactory () const
 Get the factory that created this object.
const Settingssettings () const
 Settings.
template<typename T = NEML2Object>
const T * host () const
 Get a readonly pointer to the host.
template<typename T = NEML2Object>
T * host ()
 Get a writable pointer to the host.
template<typename T>
const T & resolve_tensor (const std::string &name)
 Resolve a TensorName to a Tensor.
template<class T>
std::shared_ptr< T > get_object (const std::string &section, const std::string &name)
template<class T = EquationSystem>
std::shared_ptr< T > get_es (const std::string &name)
 Get an equation system from the factory.
template<class T = Solver>
std::shared_ptr< T > get_solver (const std::string &name)
 Get a solver from the factory.
template<class T = Data>
std::shared_ptr< T > get_data (const std::string &name)
 Get a data from the factory.
template<class T = Model>
std::shared_ptr< T > get_model (const std::string &name)
 Get a model from the factory.
template<class T = Driver>
std::shared_ptr< T > get_driver (const std::string &name)
 Get a driver from the factory.
template<class T = WorkScheduler>
std::shared_ptr< T > get_scheduler (const std::string &name)
 Get a scheduler from the factory.
Public Member Functions inherited from Scalar
 Scalar (const CScalar &init, const TensorOptions &options)
Public Member Functions inherited from PrimitiveTensor< Scalar >
 PrimitiveTensor ()=default
 Special member functions.
 operator neml2::Tensor () const
 Implicit conversion to a Tensor (discards information on the fixed base shape).
Scalar operator() (Args... i) const
 Single-element accessor.
Public Member Functions inherited from TensorBase< Scalar >
 TensorBase ()=default
 Default constructor.
Scalar variable_data () const
 Variable data without function graph.
Scalar contiguous () const
Scalar clone () const
 Clone (take ownership).
Scalar detach () const
 Discard function graph.
Scalar to (const TensorOptions &options) const
 Change tensor options.
Scalar operator- () const
 Negation.
Size batch_dim () const
Size base_dim () const
Size dynamic_dim () const
Size static_dim () const
Size intmd_dim () const
TraceableTensorShape batch_sizes () const
TensorShapeRef base_sizes () const
const TraceableTensorShapedynamic_sizes () const
TensorShapeRef static_sizes () const
TensorShapeRef intmd_sizes () const
TraceableSize batch_size (Size i) const
Size base_size (Size i) const
const TraceableSizedynamic_size (Size i) const
Size static_size (Size i) const
Size intmd_size (Size i) const
Scalar dynamic_index (indexing::TensorIndicesRef indices) const
Scalar intmd_index (indexing::TensorIndicesRef indices) const
neml2::Tensor base_index (indexing::TensorIndicesRef indices) const
Scalar batch_index (indexing::TensorIndicesRef indices) const
Scalar dynamic_slice (Size d, const indexing::Slice &index) const
Scalar intmd_slice (Size d, const indexing::Slice &index) const
neml2::Tensor base_slice (Size d, const indexing::Slice &index) const
Scalar batch_slice (Size d, const indexing::Slice &index) const
void dynamic_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
void intmd_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
void base_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
void batch_index_put_ (indexing::TensorIndicesRef indices, const ATensor &other)
Scalar dynamic_expand (const TraceableTensorShape &shape) const
Scalar intmd_expand (TensorShapeRef shape) const
neml2::Tensor base_expand (TensorShapeRef shape) const
Scalar batch_expand (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape={}) const
neml2::Tensor static_expand (TensorShapeRef intmd_shape, TensorShapeRef base_shape) const
Scalar dynamic_expand_as (const neml2::Tensor &other) const
Scalar intmd_expand_as (const neml2::Tensor &other) const
neml2::Tensor base_expand_as (const neml2::Tensor &other) const
Scalar batch_expand_as (const neml2::Tensor &other) const
neml2::Tensor static_expand_as (const neml2::Tensor &other) const
Scalar dynamic_reshape (const TraceableTensorShape &shape) const
Scalar intmd_reshape (TensorShapeRef shape) const
neml2::Tensor base_reshape (TensorShapeRef shape) const
Scalar batch_reshape (const TraceableTensorShape &dynamic_shape, TensorShapeRef intmd_shape={}) const
neml2::Tensor static_reshape (TensorShapeRef intmd_shape, TensorShapeRef base_shape) const
Scalar dynamic_squeeze (Size d) const
Scalar intmd_squeeze (Size d) const
neml2::Tensor base_squeeze (Size d) const
Scalar batch_squeeze (Size d) const
Scalar dynamic_unsqueeze (Size d, Size n=1) const
Scalar intmd_unsqueeze (Size d, Size n=1) const
neml2::Tensor base_unsqueeze (Size d, Size n=1) const
Scalar batch_unsqueeze (Size d, Size n=1) const
Scalar dynamic_transpose (Size d1, Size d2) const
Scalar intmd_transpose (Size d1, Size d2) const
neml2::Tensor base_transpose (Size d1, Size d2) const
Scalar batch_transpose (Size d1, Size d2) const
Scalar dynamic_movedim (Size old_dim, Size new_dim) const
Scalar intmd_movedim (Size old_dim, Size new_dim) const
neml2::Tensor base_movedim (Size old_dim, Size new_dim) const
Scalar batch_movedim (Size old_dim, Size new_dim) const
Scalar dynamic_flatten (Size start_dim=0, Size end_dim=-1) const
Scalar intmd_flatten (Size start_dim=0, Size end_dim=-1) const
neml2::Tensor base_flatten (Size start_dim=0, Size end_dim=-1) const
Scalar batch_flatten () const
 Flatten batch dimensions.
neml2::Tensor static_flatten () const
 Flatten static dimensions.
Public Member Functions inherited from CSVReader
 CSVReader (const NEML2Object *obj)

Static Public Member Functions

static OptionSet expected_options ()
Static Public Member Functions inherited from UserTensorBase< Scalar >
static OptionSet expected_options ()
Static Public Member Functions inherited from NEML2Object
static OptionSet expected_options ()
Static Public Member Functions inherited from PrimitiveTensor< Scalar >
static Scalar create (const TensorDataContainer &data, Size intmd_dim=0, const TensorOptions &options=default_tensor_options())
 Arbitrary tensor from a nested container with inferred batch dimension.
static Scalar einsum (c10::string_view equation, TensorList tensors)
 Einstein summation along base dimensions.
static Scalar empty (const TensorOptions &options=default_tensor_options())
static Scalar zeros (const TensorOptions &options=default_tensor_options())
static Scalar ones (const TensorOptions &options=default_tensor_options())
static Scalar full (const CScalar &init, const TensorOptions &options=default_tensor_options())
static Scalar rand (const TensorOptions &options=default_tensor_options())
static Scalar fill (Args &&... args)
Static Public Member Functions inherited from TensorBase< Scalar >
static Scalar empty_like (const Scalar &other)
static Scalar zeros_like (const Scalar &other)
 Zero tensor like another, i.e. same batch and base shapes, same tensor options, etc.
static Scalar ones_like (const Scalar &other)
 Unit tensor like another, i.e. same batch and base shapes, same tensor options, etc.
static Scalar full_like (const Scalar &other, const CScalar &init)
static Scalar rand_like (const Scalar &other)
Static Public Member Functions inherited from CSVReader
static OptionSet expected_options ()

Protected Member Functions

Scalar make () const override
 Create the tensor given input options.
Protected Member Functions inherited from PrimitiveTensor< Scalar >
void validate_shapes_and_dims () const
 Validate shapes and dimensions.
Protected Member Functions inherited from TensorBase< Scalar >
void validate_shapes_and_dims () const
 Validate shapes and dimensions.
Protected Member Functions inherited from CSVReader
csv::CSVFormat parse_format () const
 Helper function to parse CSV format.
std::vector< unsigned int > parse_indices (const csv::CSVReader &csv) const
 Helper function to parse column indices.
void read_all (csv::CSVReader &csv, std::vector< double > &vals, std::size_t &nrow, std::size_t &ncol) const
 Read all values without column indices.
void read_by_indices (csv::CSVReader &csv, const std::vector< unsigned int > &indices, std::vector< double > &vals, std::size_t &nrow, std::size_t &ncol) const
 Read values by specified column indices.

Additional Inherited Members

Public Types inherited from PrimitiveTensor< Scalar >
using base_sizes_sequence
 Base shape sequence.
Static Public Attributes inherited from PrimitiveTensor< Scalar >
static const TensorShape const_base_sizes
 The base shape.
static constexpr Size const_base_dim
 The base dim.
static constexpr Size const_base_numel
 The base numel.
Static Protected Member Functions inherited from UserTensorBase< Scalar >
static std::string tensor_type ()
 A human-readable description of the tensor type.

Constructor & Destructor Documentation

◆ MultiColumnCSVScalar()

MultiColumnCSVScalar ( const OptionSet & options)

Member Function Documentation

◆ expected_options()

OptionSet expected_options ( )
static

◆ make()

Scalar make ( ) const
overrideprotectedvirtual

Create the tensor given input options.

Implements UserTensorBase< Scalar >.