ArrayFire: seq.h Source File

1

2

3

4

5

6

7

8

9

10#pragma once

12

23

26

30

32

33#ifdef __cplusplus

34namespace af

35{

36class array;

37

46{

47public:

52

57

62

80 seq(double length = 0);

81

86

107 seq(double begin, double end, double step = 1);

108

118

125

135

150

165

182

200

202

204

206

223

224 private:

225 void init(double begin, double end, double step);

226};

227

230

233

234}

235#endif

236

237#ifdef __cplusplus

238extern "C" {

239#endif

240

243

244#ifdef __cplusplus

245}

246#endif

A multi dimensional data container.

seq is used to create sequences for indexing af::array

bool m_gfor

Flag for gfor.

seq(seq other, bool is_gfor)

Copy constructor.

friend seq operator+(double x, seq y)

seq operator-()

Negation operator creates a sequence with the signs negated.

seq(double length=0)

Creates a sequence of size length as [0, 1, 2..., length - 1].

af_seq s

Get the af_seq C-style struct.

seq(double begin, double end, double step=1)

Creates a sequence starting at begin, ending at or before end (inclusive) with increments as step.

seq operator+(double x)

Addition operator offsets the begin and end by x.

friend seq operator*(double x, seq y)

size_t size

Get's the length of the sequence.

seq operator*(double x)

Multiplication operator spaces the sequence by a factor x.

seq(const af_seq &s_)

Create a seq object from an af_seq struct.

seq & operator=(const af_seq &s)

Assignment operator to create a new sequence from an af_seq.

seq operator-(double x)

Subtraction operator offsets the begin and end by x.

friend seq operator-(double x, seq y)

AFAPI int end

A special value representing the last value of an axis.

AFAPI seq span

A special value representing the entire axis of an af::array.

static const af_seq af_span

AFAPI af_seq af_make_seq(double begin, double end, double step)

Create a new af_seq object.

C-style struct to creating sequences for indexing.

double end

End position of the sequence (inclusive)

double step

Step size between sequence values.

double begin

Start position of the sequence.