v0.14.0
Public Member Functions | Public Attributes | Friends | List of all members
Tensor1 Class Reference
Collaboration diagram for Tensor1:
[legend]

Public Member Functions

 Tensor1 (double d0, double d1, double d2)
 
doubleoperator() (const int N)
 
double operator() (const int N) const
 
template<char i>
Tensor1_Expr< Tensor1, ioperator() (const Index< i > index)
 

Public Attributes

double data0
 
double data1
 
double data2
 

Friends

ostream & operator<< (ostream &s, const Tensor1 &a)
 

Detailed Description

Definition at line 40 of file single.cpp.

Constructor & Destructor Documentation

◆ Tensor1()

Tensor1::Tensor1 ( double  d0,
double  d1,
double  d2 
)
inline

Definition at line 46 of file single.cpp.

46 : data0(d0), data1(d1), data2(d2) {}

Member Function Documentation

◆ operator()() [1/3]

template<char i>
Tensor1_Expr<Tensor1, i> Tensor1::operator() ( const Index< i index)
inline

Definition at line 57 of file single.cpp.

58  {
59  return Tensor1_Expr<Tensor1, i>(this);
60  }

◆ operator()() [2/3]

double& Tensor1::operator() ( const int  N)
inline

Definition at line 47 of file single.cpp.

48  {
49  return N == 0 ? data0 : (N == 1 ? data1 : data2);
50  }

◆ operator()() [3/3]

double Tensor1::operator() ( const int  N) const
inline

Definition at line 52 of file single.cpp.

53  {
54  return N == 0 ? data0 : (N == 1 ? data1 : data2);
55  }

Friends And Related Function Documentation

◆ operator<<

ostream& operator<< ( ostream &  s,
const Tensor1 a 
)
friend

Definition at line 65 of file single.cpp.

66 {
67  return s << a.data0 << " " << a.data1 << " " << a.data2 << " ";
68 }

Member Data Documentation

◆ data0

double Tensor1::data0

Definition at line 43 of file single.cpp.

◆ data1

double Tensor1::data1

Definition at line 43 of file single.cpp.

◆ data2

double Tensor1::data2

Definition at line 43 of file single.cpp.


The documentation for this class was generated from the following file:
Tensor1::data1
double data1
Definition: single.cpp:43
a
constexpr double a
Definition: approx_sphere.cpp:30
Tensor1::data0
double data0
Definition: single.cpp:43
Tensor1::data2
double data2
Definition: single.cpp:43
N
const int N
Definition: speed_test.cpp:3
Tensor1_Expr
Definition: single.cpp:11