ndarray
NumPy-friendly multidimensional arrays in C++
Loading...
Searching...
No Matches
include
ndarray
detail
ArrayAccess.h
Go to the documentation of this file.
1
// -*- c++ -*-
2
/*
3
* Copyright (c) 2010-2012, Jim Bosch
4
* All rights reserved.
5
*
6
* ndarray is distributed under a simple BSD-like license;
7
* see the LICENSE file that should be present in the root
8
* of the source distribution, or alternately available at:
9
* https://github.com/ndarray/ndarray
10
*/
11
#ifndef NDARRAY_DETAIL_ArrayAccess_h_INCLUDED
12
#define NDARRAY_DETAIL_ArrayAccess_h_INCLUDED
13
20
#include "
ndarray/ExpressionTraits.h
"
21
22
namespace
ndarray {
23
namespace
detail {
24
25
template
<
typename
Array_>
26
class
ArrayAccess
{
27
public
:
28
typedef
typename
ExpressionTraits< Array_ >::Element
Element;
29
typedef
typename
ExpressionTraits< Array_ >::Core
Core;
30
typedef
typename
ExpressionTraits< Array_ >::CorePtr
CorePtr;
31
32
static
CorePtr
const
& getCore(Array_
const
& array) {
33
return
array._core;
34
}
35
36
static
Array_ construct(Element * data, CorePtr
const
& core) {
37
return
Array_(data, core);
38
}
39
40
};
41
42
}
// namespace detail
43
}
// namespace ndarray
44
45
#endif
// !NDARRAY_DETAIL_ArrayAccess_h_INCLUDED
ExpressionTraits.h
Traits for Expression.
ndarray::detail::ArrayAccess
Definition
ArrayAccess.h:26
ndarray::ExpressionTraits
Traits for expressions.
Definition
ExpressionTraits.h:30
Generated on Wed Jun 21 2023 03:04:30 for ndarray by
1.9.7