Loading...
Searching...
No Matches
opennn::Shape Struct Reference

#include <opennn/core/tensor_types.h>

Public Member Functions

 Shape () noexcept=default
 
 Shape (initializer_list< Index > list)
 
template<typename It>
 Shape (It first, It last)
 
size_t get_rank () const noexcept
 
const Index * begin () const noexcept
 
const Index * end () const noexcept
 
Index operator[] (size_t i) const noexcept
 
Index back () const
 
bool empty () const noexcept
 
Index dim_or_zero (size_t i) const noexcept
 
Index size () const
 
void clear () noexcept
 
void set_dimension (size_t index, Index value)
 
void push_back (Index value)
 
bool operator== (const Shape &other) const noexcept
 
Shape & append (const Shape &other)
 

Static Public Member Functions

static Shape filled (size_t rank, Index value)
 

Static Public Attributes

static constexpr size_t MaxRank = 4
 

Friends

ostream & operator<< (ostream &os, const Shape &shape)
 

Constructor & Destructor Documentation

◆ Shape() [1/3]

opennn::Shape::Shape ( )
defaultnoexcept

◆ Shape() [2/3]

opennn::Shape::Shape ( initializer_list< Index > list)
inline

◆ Shape() [3/3]

template<typename It>
opennn::Shape::Shape ( It first,
It last )
inline

Member Function Documentation

◆ append()

Shape & opennn::Shape::append ( const Shape & other)
inline

◆ back()

Index opennn::Shape::back ( ) const
inline

◆ begin()

const Index * opennn::Shape::begin ( ) const
inlinenoexcept

◆ clear()

void opennn::Shape::clear ( )
inlinenoexcept

◆ dim_or_zero()

Index opennn::Shape::dim_or_zero ( size_t i) const
inlinenoexcept

◆ empty()

bool opennn::Shape::empty ( ) const
inlinenoexcept

◆ end()

const Index * opennn::Shape::end ( ) const
inlinenoexcept

◆ filled()

static Shape opennn::Shape::filled ( size_t rank,
Index value )
inlinestatic

◆ get_rank()

size_t opennn::Shape::get_rank ( ) const
inlinenoexcept

◆ operator==()

bool opennn::Shape::operator== ( const Shape & other) const
inlinenoexcept

◆ operator[]()

Index opennn::Shape::operator[] ( size_t i) const
inlinenoexcept

◆ push_back()

void opennn::Shape::push_back ( Index value)
inline

◆ set_dimension()

void opennn::Shape::set_dimension ( size_t index,
Index value )
inline

◆ size()

Index opennn::Shape::size ( ) const
inline

Friends And Related Symbol Documentation

◆ operator<<

ostream & operator<< ( ostream & os,
const Shape & shape )
friend

Member Data Documentation

◆ MaxRank

size_t opennn::Shape::MaxRank = 4
staticconstexpr