mxnet
Public Member Functions | Friends | List of all members
nnvm::OpMap< ValueType > Class Template Reference

A map data structure that takes Op* as key and returns ValueType. More...

#include <op.h>

Collaboration diagram for nnvm::OpMap< ValueType >:
Collaboration graph

Public Member Functions

const ValueType & operator[] (const Op *op) const
 get the corresponding value element at op More...
 
const ValueType & get (const Op *op, const ValueType &def_value) const
 get the corresponding value element at op with default value. More...
 
int count (const Op *op) const
 Check if the map has op as key. More...
 
bool contains (const Op *op) const
 Check if the map has op as key. More...
 

Friends

class Op
 operator structure from NNVM More...
 

Detailed Description

template<typename ValueType>
class nnvm::OpMap< ValueType >

A map data structure that takes Op* as key and returns ValueType.

Template Parameters
ValueTypeThe type of the value stored in map.

Member Function Documentation

template<typename ValueType >
bool nnvm::OpMap< ValueType >::contains ( const Op op) const
inline

Check if the map has op as key.

Parameters
opThe key to the map
Returns
true if op is contained in map, false otherwise.
template<typename ValueType >
int nnvm::OpMap< ValueType >::count ( const Op op) const
inline

Check if the map has op as key.

Parameters
opThe key to the map
Returns
1 if op is contained in map, 0 otherwise.
template<typename ValueType >
const ValueType & nnvm::OpMap< ValueType >::get ( const Op op,
const ValueType &  def_value 
) const
inline

get the corresponding value element at op with default value.

Parameters
opThe key to the map
def_valueThe default value when the key does not exist.
Returns
the const reference to the content value.
template<typename ValueType >
const ValueType & nnvm::OpMap< ValueType >::operator[] ( const Op op) const
inline

get the corresponding value element at op

Parameters
opThe key to the map
Returns
the const reference to the content value.

Friends And Related Function Documentation

template<typename ValueType>
friend class Op
friend

operator structure from NNVM


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