liuxiaolong
2021-07-20 58d904a328c0d849769b483e901a0be9426b8209
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
//  Copyright (c) 2018-2019
//  Cem Bassoy
//
//  Distributed under the Boost Software License, Version 1.0. (See
//  accompanying file LICENSE_1_0.txt or copy at
//  http://www.boost.org/LICENSE_1_0.txt)
//
//  The authors gratefully acknowledge the support of
//  Fraunhofer and Google in producing this work
//  which started as a Google Summer of Code project.
//
 
 
/// \file tensor.hpp Definition for the tensor template class
 
#ifndef BOOST_UBLAS_TENSOR_IMPL_HPP
#define BOOST_UBLAS_TENSOR_IMPL_HPP
 
#include <boost/config.hpp>
 
#include <initializer_list>
 
#include "algorithms.hpp"
#include "expression.hpp"
#include "expression_evaluation.hpp"
#include "extents.hpp"
#include "strides.hpp"
#include "index.hpp"
 
namespace boost { namespace numeric { namespace ublas {
 
template<class T, class F, class A>
class tensor;
 
template<class T, class F, class A>
class matrix;
 
template<class T, class A>
class vector;
 
///** \brief Base class for Tensor container models
// *
// * it does not model the Tensor concept but all derived types should.
// * The class defines a common base type and some common interface for all
// * statically derived Tensor classes
// * We implement the casts to the statically derived type.
// */
//template<class C>
//class tensor_container:
//        public detail::tensor_expression<C>
//{
//public:
//    static const unsigned complexity = 0;
//    typedef C container_type;
//    typedef tensor_tag type_category;
 
//    BOOST_UBLAS_INLINE
//    const container_type &operator () () const {
//            return *static_cast<const container_type *> (this);
//    }
//    BOOST_UBLAS_INLINE
//    container_type &operator () () {
//            return *static_cast<container_type *> (this);
//    }
//};
 
 
 
/** @brief A dense tensor of values of type \c T.
        *
        * For a \f$n\f$-dimensional tensor \f$v\f$ and \f$0\leq i < n\f$ every element \f$v_i\f$ is mapped
        * to the \f$i\f$-th element of the container. A storage type \c A can be specified which defaults to \c unbounded_array.
        * Elements are constructed by \c A, which need not initialise their value.
        *
        * @tparam T type of the objects stored in the tensor (like int, double, complex,...)
        * @tparam A The type of the storage array of the tensor. Default is \c unbounded_array<T>. \c <bounded_array<T> and \c std::vector<T> can also be used
        */
template<class T, class F = first_order, class A = std::vector<T,std::allocator<T>> >
class tensor:
        public detail::tensor_expression<tensor<T, F, A>,tensor<T, F, A>>
{
 
    static_assert( std::is_same<F,first_order>::value ||
                                 std::is_same<F,last_order >::value, "boost::numeric::tensor template class only supports first- or last-order storage formats.");
 
    using self_type  = tensor<T, F, A>;
public:
 
 
 
    template<class derived_type>
    using tensor_expression_type = detail::tensor_expression<self_type,derived_type>;
 
    template<class derived_type>
    using matrix_expression_type = matrix_expression<derived_type>;
 
    template<class derived_type>
    using vector_expression_type = vector_expression<derived_type>;
 
    using super_type = tensor_expression_type<self_type>;
 
//    static_assert(std::is_same_v<tensor_expression_type<self_type>, detail::tensor_expression<tensor<T,F,A>,tensor<T,F,A>>>, "tensor_expression_type<self_type>");
 
    using array_type  = A;
    using layout_type = F;
 
 
    using size_type       = typename array_type::size_type;
    using difference_type = typename array_type::difference_type;
    using value_type      = typename array_type::value_type;
 
    using reference       = typename array_type::reference;
    using const_reference = typename array_type::const_reference;
 
    using pointer         = typename array_type::pointer;
    using const_pointer   = typename array_type::const_pointer;
 
    using iterator        = typename array_type::iterator;
    using const_iterator  = typename array_type::const_iterator;
 
    using reverse_iterator        = typename array_type::reverse_iterator;
    using const_reverse_iterator  = typename array_type::const_reverse_iterator;
 
    using tensor_temporary_type = self_type;
    using storage_category = dense_tag;
 
    using strides_type = basic_strides<std::size_t,layout_type>;
    using extents_type = shape;
 
    using matrix_type     = matrix<value_type,layout_type,array_type>;
    using vector_type     = vector<value_type,array_type>;
 
 
    /** @brief Constructs a tensor.
     *
     * @note the tensor is empty.
     * @note the tensor needs to reshaped for further use.
     *
     */
    BOOST_UBLAS_INLINE
    constexpr tensor ()
        : tensor_expression_type<self_type>() // container_type
        , extents_()
        , strides_()
        , data_()
    {
    }
 
 
    /** @brief Constructs a tensor with an initializer list
     *
     * By default, its elements are initialized to 0.
     *
     * @code tensor<float> A{4,2,3}; @endcode
     *
     * @param l initializer list for setting the dimension extents of the tensor
     */
    explicit BOOST_UBLAS_INLINE
    tensor (std::initializer_list<size_type> l)
        : tensor_expression_type<self_type>()
        , extents_ (std::move(l))
        , strides_ (extents_)
        , data_    (extents_.product())
    {
    }
 
 
    /** @brief Constructs a tensor with a \c shape
     *
     * By default, its elements are initialized to 0.
     *
     * @code tensor<float> A{extents{4,2,3}}; @endcode
     *
     * @param s initial tensor dimension extents
     */
    explicit BOOST_UBLAS_INLINE
    tensor (extents_type const& s)
        : tensor_expression_type<self_type>() //tensor_container<self_type>()
        , extents_ (s)
        , strides_ (extents_)
        , data_    (extents_.product())
    {}
 
 
    /** @brief Constructs a tensor with a \c shape and initiates it with one-dimensional data
     *
     * @code tensor<float> A{extents{4,2,3}, array }; @endcode
     *
     *
     *  @param s initial tensor dimension extents
     *  @param a container of \c array_type that is copied according to the storage layout
     */
    BOOST_UBLAS_INLINE
    tensor (extents_type const& s, const array_type &a)
        : tensor_expression_type<self_type>() //tensor_container<self_type>()
        , extents_ (s)
        , strides_ (extents_)
        , data_    (a)
    {
        if(this->extents_.product() != this->data_.size())
            throw std::runtime_error("Error in boost::numeric::ublas::tensor: size of provided data and specified extents do not match.");
    }
 
 
 
    /** @brief Constructs a tensor using a shape tuple and initiates it with a value.
     *
     *  @code tensor<float> A{extents{4,2,3}, 1 }; @endcode
     *
     *  @param e initial tensor dimension extents
     *  @param i initial value of all elements of type \c value_type
     */
    BOOST_UBLAS_INLINE
    tensor (extents_type const& e, const value_type &i)
        : tensor_expression_type<self_type>() //tensor_container<self_type> ()
        , extents_ (e)
        , strides_ (extents_)
        , data_    (extents_.product(), i)
    {}
 
 
 
    /** @brief Constructs a tensor from another tensor
     *
     *  @param v tensor to be copied.
     */
    BOOST_UBLAS_INLINE
    tensor (const tensor &v)
        : tensor_expression_type<self_type>()
        , extents_ (v.extents_)
        , strides_ (v.strides_)
        , data_    (v.data_   )
    {}
 
 
 
    /** @brief Constructs a tensor from another tensor
     *
     *  @param v tensor to be moved.
     */
    BOOST_UBLAS_INLINE
    tensor (tensor &&v)
        : tensor_expression_type<self_type>() //tensor_container<self_type> ()
        , extents_ (std::move(v.extents_))
        , strides_ (std::move(v.strides_))
        , data_    (std::move(v.data_   ))
    {}
 
 
    /** @brief Constructs a tensor with a matrix
     *
     * \note Initially the tensor will be two-dimensional.
     *
     *  @param v matrix to be copied.
     */
    BOOST_UBLAS_INLINE
    tensor (const matrix_type &v)
        : tensor_expression_type<self_type>()
        , extents_ ()
        , strides_ ()
        , data_    (v.data())
    {
        if(!data_.empty()){
            extents_ = extents_type{v.size1(),v.size2()};
            strides_ = strides_type(extents_);
        }
    }
 
    /** @brief Constructs a tensor with a matrix
     *
     * \note Initially the tensor will be two-dimensional.
     *
     *  @param v matrix to be moved.
     */
    BOOST_UBLAS_INLINE
    tensor (matrix_type &&v)
        : tensor_expression_type<self_type>()
        , extents_ {}
        , strides_ {}
        , data_    {}
    {
        if(v.size1()*v.size2() != 0){
            extents_ = extents_type{v.size1(),v.size2()};
            strides_ = strides_type(extents_);
            data_    = std::move(v.data());
        }
    }
 
    /** @brief Constructs a tensor using a \c vector
     *
     * @note It is assumed that vector is column vector
     * @note Initially the tensor will be one-dimensional.
     *
     *  @param v vector to be copied.
     */
    BOOST_UBLAS_INLINE
    tensor (const vector_type &v)
        : tensor_expression_type<self_type>()
        , extents_ ()
        , strides_ ()
        , data_    (v.data())
    {
        if(!data_.empty()){
            extents_ = extents_type{data_.size(),1};
            strides_ = strides_type(extents_);
        }
    }
 
    /** @brief Constructs a tensor using a \c vector
     *
     *  @param v vector to be moved.
     */
    BOOST_UBLAS_INLINE
    tensor (vector_type &&v)
        : tensor_expression_type<self_type>()
        , extents_ {}
        , strides_ {}
        , data_    {}
    {
        if(v.size() != 0){
            extents_ = extents_type{v.size(),1};
            strides_ = strides_type(extents_);
            data_    = std::move(v.data());
        }
    }
 
 
    /** @brief Constructs a tensor with another tensor with a different layout
     *
     * @param other tensor with a different layout to be copied.
     */
    BOOST_UBLAS_INLINE
    template<class other_layout>
    tensor (const tensor<value_type, other_layout> &other)
        : tensor_expression_type<self_type> ()
        , extents_ (other.extents())
        , strides_ (other.extents())
        , data_    (other.extents().product())
    {
        copy(this->rank(), this->extents().data(),
                 this->data(), this->strides().data(),
                 other.data(), other.strides().data());
    }
 
    /** @brief Constructs a tensor with an tensor expression
     *
     * @code tensor<float> A = B + 3 * C; @endcode
     *
     * @note type must be specified of tensor must be specified.
     * @note dimension extents are extracted from tensors within the expression.
     *
     * @param expr tensor expression
     */
    BOOST_UBLAS_INLINE
    template<class derived_type>
    tensor (const tensor_expression_type<derived_type> &expr)
        : tensor_expression_type<self_type> ()
        , extents_ ( detail::retrieve_extents(expr) )
        , strides_ ( extents_ )
        , data_    ( extents_.product() )
    {
        static_assert( detail::has_tensor_types<self_type, tensor_expression_type<derived_type>>::value,
                                     "Error in boost::numeric::ublas::tensor: expression does not contain a tensor. cannot retrieve shape.");
        detail::eval( *this, expr );
    }
 
    /** @brief Constructs a tensor with a matrix expression
     *
     * @code tensor<float> A = B + 3 * C; @endcode
     *
     * @note matrix expression is evaluated and pushed into a temporary matrix before assignment.
     * @note extents are automatically extracted from the temporary matrix
     *
     * @param expr matrix expression
     */
    BOOST_UBLAS_INLINE
    template<class derived_type>
    tensor (const matrix_expression_type<derived_type> &expr)
        : tensor(  matrix_type ( expr )  )
    {
    }
 
    /** @brief Constructs a tensor with a vector expression
     *
     * @code tensor<float> A = b + 3 * b; @endcode
     *
     * @note matrix expression is evaluated and pushed into a temporary matrix before assignment.
     * @note extents are automatically extracted from the temporary matrix
     *
     * @param expr vector expression
     */
    BOOST_UBLAS_INLINE
    template<class derived_type>
    tensor (const vector_expression_type<derived_type> &expr)
        : tensor(  vector_type ( expr )  )
    {
    }
 
    /** @brief Evaluates the tensor_expression and assigns the results to the tensor
     *
     * @code A = B + C * 2;  @endcode
     *
     * @note rank and dimension extents of the tensors in the expressions must conform with this tensor.
     *
     * @param expr expression that is evaluated.
     */
    BOOST_UBLAS_INLINE
    template<class derived_type>
    tensor &operator = (const tensor_expression_type<derived_type> &expr)
    {
        detail::eval(*this, expr);
        return *this;
    }
 
    tensor& operator=(tensor other)
    {
        swap (*this, other);
        return *this;
    }
 
    tensor& operator=(const_reference v)
    {
        std::fill(this->begin(), this->end(), v);
        return *this;
    }
 
    /** @brief Returns true if the tensor is empty (\c size==0) */
    BOOST_UBLAS_INLINE
    bool empty () const {
        return this->data_.empty();
    }
 
 
    /** @brief Returns the size of the tensor */
    BOOST_UBLAS_INLINE
    size_type size () const {
        return this->data_.size ();
    }
 
    /** @brief Returns the size of the tensor */
    BOOST_UBLAS_INLINE
    size_type size (size_type r) const {
        return this->extents_.at(r);
    }
 
    /** @brief Returns the number of dimensions/modes of the tensor */
    BOOST_UBLAS_INLINE
    size_type rank () const {
        return this->extents_.size();
    }
 
    /** @brief Returns the number of dimensions/modes of the tensor */
    BOOST_UBLAS_INLINE
    size_type order () const {
        return this->extents_.size();
    }
 
    /** @brief Returns the strides of the tensor */
    BOOST_UBLAS_INLINE
    strides_type const& strides () const {
        return this->strides_;
    }
 
    /** @brief Returns the extents of the tensor */
    BOOST_UBLAS_INLINE
    extents_type const& extents () const {
        return this->extents_;
    }
 
 
    /** @brief Returns a \c const reference to the container. */
    BOOST_UBLAS_INLINE
    const_pointer data () const {
        return this->data_.data();
    }
 
    /** @brief Returns a \c const reference to the container. */
    BOOST_UBLAS_INLINE
    pointer data () {
        return this->data_.data();
    }
 
    /** @brief Element access using a single index.
     *
     *  @code auto a = A[i]; @endcode
     *
     *  @param i zero-based index where 0 <= i < this->size()
     */
    BOOST_UBLAS_INLINE
    const_reference operator [] (size_type i) const {
        return this->data_[i];
    }
 
    /** @brief Element access using a single index.
     *
     *
     *  @code A[i] = a; @endcode
     *
     *  @param i zero-based index where 0 <= i < this->size()
     */
    BOOST_UBLAS_INLINE
    reference operator [] (size_type i)
    {
        return this->data_[i];
    }
 
 
    /** @brief Element access using a multi-index or single-index.
     *
     *
     *  @code auto a = A.at(i,j,k); @endcode or
     *  @code auto a = A.at(i);     @endcode
     *
     *  @param i zero-based index where 0 <= i < this->size() if sizeof...(is) == 0, else 0<= i < this->size(0)
     *  @param is zero-based indices where 0 <= is[r] < this->size(r) where  0 < r < this->rank()
     */
    template<class ... size_types>
    BOOST_UBLAS_INLINE
    const_reference at (size_type i, size_types ... is) const {
        if constexpr (sizeof...(is) == 0)
            return this->data_[i];
        else
            return this->data_[detail::access<0ul>(size_type(0),this->strides_,i,std::forward<size_types>(is)...)];
    }
 
    /** @brief Element access using a multi-index or single-index.
     *
     *
     *  @code A.at(i,j,k) = a; @endcode or
     *  @code A.at(i) = a;     @endcode
     *
     *  @param i zero-based index where 0 <= i < this->size() if sizeof...(is) == 0, else 0<= i < this->size(0)
     *  @param is zero-based indices where 0 <= is[r] < this->size(r) where  0 < r < this->rank()
     */
    BOOST_UBLAS_INLINE
    template<class ... size_types>
    reference at (size_type i, size_types ... is) {
        if constexpr (sizeof...(is) == 0)
            return this->data_[i];
        else
            return this->data_[detail::access<0ul>(size_type(0),this->strides_,i,std::forward<size_types>(is)...)];
    }
 
 
 
 
    /** @brief Element access using a single index.
     *
     *
     *  @code A(i) = a; @endcode
     *
     *  @param i zero-based index where 0 <= i < this->size()
     */
    BOOST_UBLAS_INLINE
    const_reference operator()(size_type i) const {
        return this->data_[i];
    }
 
 
    /** @brief Element access using a single index.
     *
     *  @code A(i) = a; @endcode
     *
     *  @param i zero-based index where 0 <= i < this->size()
     */
    BOOST_UBLAS_INLINE
    reference operator()(size_type i){
        return this->data_[i];
    }
 
 
 
 
    /** @brief Generates a tensor index for tensor contraction
     *
     *
     *  @code auto Ai = A(_i,_j,k); @endcode
     *
     *  @param i placeholder
     *  @param is zero-based indices where 0 <= is[r] < this->size(r) where  0 < r < this->rank()
     */
    BOOST_UBLAS_INLINE
    template<std::size_t I, class ... index_types>
    decltype(auto) operator() (index::index_type<I> p, index_types ... ps) const
    {
        constexpr auto N = sizeof...(ps)+1;
        if( N != this->rank() )
            throw std::runtime_error("Error in boost::numeric::ublas::operator(): size of provided index_types does not match with the rank.");
 
        return std::make_pair( std::cref(*this),  std::make_tuple( p, std::forward<index_types>(ps)... ) );
    }
 
 
 
 
 
    /** @brief Reshapes the tensor
     *
     *
     * (1) @code A.reshape(extents{m,n,o});     @endcode or
     * (2) @code A.reshape(extents{m,n,o},4);   @endcode
     *
     * If the size of this smaller than the specified extents than
     * default constructed (1) or specified (2) value is appended.
     *
     * @note rank of the tensor might also change.
     *
     * @param e extents with which the tensor is reshaped.
     * @param v value which is appended if the tensor is enlarged.
     */
    BOOST_UBLAS_INLINE
    void reshape (extents_type const& e, value_type v = value_type{})
    {
        this->extents_ = e;
        this->strides_ = strides_type(this->extents_);
 
        if(e.product() != this->size())
            this->data_.resize (this->extents_.product(), v);
    }
 
 
 
 
 
    friend void swap(tensor& lhs, tensor& rhs) {
        std::swap(lhs.data_   , rhs.data_   );
        std::swap(lhs.extents_, rhs.extents_);
        std::swap(lhs.strides_, rhs.strides_);
    }
 
 
    /// \brief return an iterator on the first element of the tensor
    BOOST_UBLAS_INLINE
    const_iterator begin () const {
        return data_.begin ();
    }
 
    /// \brief return an iterator on the first element of the tensor
    BOOST_UBLAS_INLINE
    const_iterator cbegin () const {
        return data_.cbegin ();
    }
 
    /// \brief return an iterator after the last element of the tensor
    BOOST_UBLAS_INLINE
    const_iterator end () const {
        return data_.end();
    }
 
    /// \brief return an iterator after the last element of the tensor
    BOOST_UBLAS_INLINE
    const_iterator cend () const {
        return data_.cend ();
    }
 
    /// \brief Return an iterator on the first element of the tensor
    BOOST_UBLAS_INLINE
    iterator begin () {
        return data_.begin();
    }
 
    /// \brief Return an iterator at the end of the tensor
    BOOST_UBLAS_INLINE
    iterator end () {
        return data_.end();
    }
 
    /// \brief Return a const reverse iterator before the first element of the reversed tensor (i.e. end() of normal tensor)
    BOOST_UBLAS_INLINE
    const_reverse_iterator rbegin () const {
        return data_.rbegin();
    }
 
    /// \brief Return a const reverse iterator before the first element of the reversed tensor (i.e. end() of normal tensor)
    BOOST_UBLAS_INLINE
    const_reverse_iterator crbegin () const {
        return data_.crbegin();
    }
 
    /// \brief Return a const reverse iterator on the end of the reverse tensor (i.e. first element of the normal tensor)
    BOOST_UBLAS_INLINE
    const_reverse_iterator rend () const {
        return data_.rend();
    }
 
    /// \brief Return a const reverse iterator on the end of the reverse tensor (i.e. first element of the normal tensor)
    BOOST_UBLAS_INLINE
    const_reverse_iterator crend () const {
        return data_.crend();
    }
 
    /// \brief Return a const reverse iterator before the first element of the reversed tensor (i.e. end() of normal tensor)
    BOOST_UBLAS_INLINE
    reverse_iterator rbegin () {
        return data_.rbegin();
    }
 
    /// \brief Return a const reverse iterator on the end of the reverse tensor (i.e. first element of the normal tensor)
    BOOST_UBLAS_INLINE
    reverse_iterator rend () {
        return data_.rend();
    }
 
 
#if 0
    // -------------
    // Serialization
    // -------------
 
    /// Serialize a tensor into and archive as defined in Boost
    /// \param ar Archive object. Can be a flat file, an XML file or any other stream
    /// \param file_version Optional file version (not yet used)
    template<class Archive>
    void serialize(Archive & ar, const unsigned int /* file_version */){
        ar & serialization::make_nvp("data",data_);
    }
#endif
 
 
 
private:
 
    extents_type extents_;
    strides_type strides_;
    array_type data_;
};
 
}}} // namespaces
 
 
 
 
 
#endif