v0.7.24
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, i > operator() (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 
)

Definition at line 46 of file single.cpp.

46 : data0(d0), data1(d1), data2(d2) {}
double data2
Definition: single.cpp:43
double data0
Definition: single.cpp:43
double data1
Definition: single.cpp:43

Member Function Documentation

◆ operator()() [1/3]

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

Definition at line 47 of file single.cpp.

48  {
49  return N == 0 ? data0 : (N == 1 ? data1 : data2);
50  }
double data2
Definition: single.cpp:43
double data0
Definition: single.cpp:43
double data1
Definition: single.cpp:43

◆ operator()() [2/3]

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

Definition at line 52 of file single.cpp.

53  {
54  return N == 0 ? data0 : (N == 1 ? data1 : data2);
55  }
double data2
Definition: single.cpp:43
double data0
Definition: single.cpp:43
double data1
Definition: single.cpp:43

◆ operator()() [3/3]

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

Definition at line 57 of file single.cpp.

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

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 }
double data2
Definition: single.cpp:43
double data0
Definition: single.cpp:43
double data1
Definition: single.cpp:43

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: