seq is used to create sequences for indexing af::array More...
#include <seq.h>
Public Member Functions  
seq (double length=0)  
Creates a sequence of size length as [0, 1, 2..., length  1]. More...  
~seq ()  
Destructor. More...  
seq (double begin, double end, double step=1)  
Creates a sequence starting at begin, ending at or before end (inclusive) with increments as step. More...  
seq (seq other, bool is_gfor)  
Copy constructor. More...  
seq (const af_seq &s_)  
Create a seq object from an af_seq struct. More...  
seq &  operator= (const af_seq &s) 
Assignment operator to create a new sequence from an af_seq. More...  
seq  operator () 
Negation operator creates a sequence with the signs negated. More...  
seq  operator+ (double x) 
Addition operator offsets the begin and end by x. More...  
seq  operator (double x) 
Subtraction operator offsets the begin and end by x. More...  
seq  operator* (double x) 
Multiplication operator spaces the sequence by a factor x. More...  
operator array () const  
Implicit conversion operator from seq to af::array. More...  
Data Fields  
af_seq  s 
Get the af_seq Cstyle struct. More...  
size_t  size 
Get's the length of the sequence. More...  
bool  m_gfor 
Flag for gfor. More...  
Friends  
seq  operator+ (double x, seq y) 
seq  operator (double x, seq y) 
seq  operator* (double x, seq y) 
seq  (  double  length = 0  ) 
Creates a sequence of size length as [0, 1, 2..., length  1].
The sequence has begin as 0, end as length  1 and step as 1.
[in]  length  is the size of the seq to be created. 
~seq  (  ) 
Destructor.
seq  (  double  begin, 
double  end,  
double  step = 1 

) 
Creates a sequence starting at begin, ending at or before end (inclusive) with increments as step.
The sequence will be [begin, begin + step, begin + 2 * step...., begin + n * step] where the begin + n * step <= end.
[in]  begin  is the start of the sequence 
[in]  end  is the maximum value a sequence can take (inclusive) 
[in]  step  is the increment or decrement size (default is 1) 
Copy constructor.
Creates a copy seq from another sequence.
[in]  other  seqence to be copies 
[in]  is_gfor  is the gfor flag 
operator array  (  )  const 
Implicit conversion operator from seq to af::array.
Convertes a seq object into an af::array object. The contents of the af:array will be the explicit values from the seq.

inline 
Multiplication operator spaces the sequence by a factor x.
begin is changed to begin * x end is changed to end * x step is changed to step * x
Definition at line 199 of file seq.h.

inline 

inline 

inline 
Subtraction operator offsets the begin and end by x.
There is no change in step.
begin is changed to begin  x end is changed to end  x
Assignment operator to create a new sequence from an af_seq.
This operator creates a new sequence using the begin, end and step from the input sequence.
[in]  s  is the input sequence 