mxnet
Public Member Functions | Public Attributes | List of all members
mshadow::expr::RangeExp< DType > Struct Template Reference

Generate a range vector similar to python: range(start, stop[, step][, repeat]). If step is positive, the last element is the largest start + i * step less than stop If step is negative, the last element is the smallest start + i * step greater than stop. All elements are repeated for repeat times, e.g range(0, 4, 2, 3) –> 0, 0, 0, 2, 2, 2. More...

#include <range.h>

Inheritance diagram for mshadow::expr::RangeExp< DType >:
Inheritance graph
Collaboration diagram for mshadow::expr::RangeExp< DType >:
Collaboration graph

Public Member Functions

 RangeExp (DType start, DType stop, DType step, int repeat)
 constructor More...
 
- Public Member Functions inherited from mshadow::expr::Exp< RangeExp< DType >, DType, type::kMapper >
const RangeExp< DType > & self (void) const
 
RangeExp< DType > * ptrself (void)
 

Public Attributes

const DType start_
 
const DType stop_
 
const DType step_
 
const int repeat_
 

Detailed Description

template<typename DType>
struct mshadow::expr::RangeExp< DType >

Generate a range vector similar to python: range(start, stop[, step][, repeat]). If step is positive, the last element is the largest start + i * step less than stop If step is negative, the last element is the smallest start + i * step greater than stop. All elements are repeated for repeat times, e.g range(0, 4, 2, 3) –> 0, 0, 0, 2, 2, 2.

Template Parameters
SrcExptype of lhs expression
IndexExptype of index expression
DTypethe type of elements

Constructor & Destructor Documentation

template<typename DType>
mshadow::expr::RangeExp< DType >::RangeExp ( DType  start,
DType  stop,
DType  step,
int  repeat 
)
inline

constructor

Member Data Documentation

template<typename DType>
const int mshadow::expr::RangeExp< DType >::repeat_
template<typename DType>
const DType mshadow::expr::RangeExp< DType >::start_
template<typename DType>
const DType mshadow::expr::RangeExp< DType >::step_
template<typename DType>
const DType mshadow::expr::RangeExp< DType >::stop_

The documentation for this struct was generated from the following file: