class ngraph::CoordinateTransformBasic

Overview

Class which allows to calculate item index with given coordinates in tensor and helps to iterate over all coordinates. Tensor items should be placed in memory in row-major order. More…

#include <coordinate_transform.hpp>

class CoordinateTransformBasic
{
public:
    // typedefs

    typedef CoordinateIterator Iterator;

    // construction

    CoordinateTransformBasic(const Shape& source_shape);

    // methods

    size_t index(const Coordinate& c) const;
    CoordinateIterator begin() const;
    const CoordinateIterator& end() const;
};

Detailed Documentation

Class which allows to calculate item index with given coordinates in tensor and helps to iterate over all coordinates. Tensor items should be placed in memory in row-major order.

Methods

size_t index(const Coordinate& c) const

The tensor element index calculation by given coordinate.

Deprecated

Parameters:

c

tensor element coordinate

CoordinateIterator begin() const

Returns an iterator to the first coordinate of the tensor.

const CoordinateIterator& end() const

Returns an iterator to the coordinate following the last element of the tensor.