mptensor v0.6.0
Parallel Library for Tensor Network Methods
Loading...
Searching...
No Matches
index.hpp File Reference

header file of BasicIndex class template More...

#include <algorithm>
#include <cassert>
#include <cstddef>
#include <initializer_list>
#include <iostream>
#include <limits>
#include <sstream>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <utility>
#include <vector>
Include dependency graph for index.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mptensor::internal::is_unscoped_enum< I, bool >
 
struct  mptensor::internal::is_unscoped_enum< I, true >
 
class  mptensor::BasicIndex< T >
 

Namespaces

namespace  mptensor
 
namespace  mptensor::internal
 Library-internal helpers and types.
 

Typedefs

using mptensor::Index = BasicIndex< std::ptrdiff_t >
 
using mptensor::Axes = Index
 
using mptensor::Shape = Index
 
using mptensor::internal::UIndex = BasicIndex< std::size_t >
 
using mptensor::internal::UAxes = UIndex
 
using mptensor::internal::UShape = UIndex
 

Functions

template<typename T , typename I >
T mptensor::internal::checked_index_cast (I value)
 
template<typename T >
std::ostream & mptensor::operator<< (std::ostream &os, const BasicIndex< T > &idx)
 
template<typename T >
BasicIndex< T > mptensor::operator+ (const BasicIndex< T > &lhs, const BasicIndex< T > &rhs)
 
size_t mptensor::internal::normalize_value (std::ptrdiff_t v, size_t n, bool end_inclusive, const char *kind, std::ptrdiff_t position, const char *position_name="position")
 
UAxes mptensor::internal::identity_axes (size_t n)
 
std::pair< size_t, size_t > mptensor::internal::normalize_slice_range (std::ptrdiff_t begin, std::ptrdiff_t end, size_t n, size_t axis)
 
void mptensor::internal::normalize_slice_ranges (const Index &begin, const Index &end, const UShape &shape, UIndex &ubegin, UIndex &uend)
 
size_t mptensor::normalize_axis (std::ptrdiff_t a, size_t rank)
 
internal::UAxes mptensor::normalize_axes (const Axes &axes, size_t rank)
 
size_t mptensor::normalize_index (std::ptrdiff_t i, size_t n)
 
internal::UIndex mptensor::normalize_index (const Index &idx, const internal::UShape &shape)
 
size_t mptensor::normalize_slice_end (std::ptrdiff_t e, size_t n)
 
internal::UShape mptensor::to_internal_shape (const Shape &s)
 
Index mptensor::to_public (const internal::UIndex &u)
 
Index mptensor::range (const std::ptrdiff_t start, const std::ptrdiff_t stop, const std::ptrdiff_t step)
 Arithmetic sequence start, start+step, ... up to (not including) stop.
 
Index mptensor::range (const std::ptrdiff_t start, const std::ptrdiff_t stop)
 
Index mptensor::range (const std::ptrdiff_t stop)
 

Variables

template<typename I >
constexpr bool mptensor::internal::is_index_value_v
 

Detailed Description

header file of BasicIndex class template

Author
Satoshi Morita
Date
Jan 08 2015