00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029 #ifndef COO_MATRIX_PARTITIONED_VIEW_CLASS_DECL_H
00030 #define COO_MATRIX_PARTITIONED_VIEW_CLASS_DECL_H
00031
00032 #include "AbstractLinAlgPack_SparseCOOPtrElement.hpp"
00033 #include "AbstractLinAlgPack_TransSparseCOOElementViewIter.hpp"
00034 #include "MiRefCount.h"
00035
00036 namespace AbstractLinAlgPack {
00037
00038 namespace COOMatrixPartitionedViewUtilityPack {
00039 template <class T_Indice, class T_Value> class Partition;
00040 template <class T_Indice, class T_Value> class TransposedPartition;
00041 }
00042
00043
00044
00170 template <class T_Indice, class T_Value>
00171 class COOMatrixPartitionedView {
00172 public:
00173
00174
00177
00179 typedef COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>
00180 partition_type;
00182 typedef COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>
00183 transposed_partition_type;
00185 typedef T_Indice indice_type;
00187 typedef AbstractLinAlgPack::size_type size_type;
00189 typedef ptrdiff_t difference_type;
00191 enum EPartitionOrder { PARTITION_BY_ROW, PARTITION_BY_COL };
00193 class UninitializedException: public std::logic_error
00194 {public: UninitializedException(const std::string& what_arg) : std::logic_error(what_arg) {}};
00195
00197
00198
00201
00208
00218 COOMatrixPartitionedView();
00219
00224 COOMatrixPartitionedView(
00225 size_type rows
00226 , size_type cols
00227 , size_type nz
00228 , value_type val[]
00229 , const indice_type ivect[]
00230 , const indice_type jvect[]
00231 , const size_type inv_row_perm[]
00232 , const size_type inv_col_perm[]
00233 , const size_type num_row_part
00234 , const size_type row_part[]
00235 , const size_type num_col_part
00236 , const size_type col_part[]
00237 , const EPartitionOrder partition_order )
00238
00239 : num_row_part_(0), num_col_part_(0)
00240 {
00241 create_view(rows, cols, nz, val, ivect, jvect, inv_row_perm, inv_col_perm, num_row_part
00242 , row_part, num_col_part, col_part, partition_order);
00243 }
00244
00245
00246
00247
00248
00322 void create_view(
00323 size_type rows
00324 , size_type cols
00325 , size_type nz
00326 , value_type val[]
00327 , const indice_type ivect[]
00328 , const indice_type jvect[]
00329 , const size_type inv_row_perm[]
00330 , const size_type inv_col_perm[]
00331 , const size_type num_row_part
00332 , const size_type row_part[]
00333 , const size_type num_col_part
00334 , const size_type col_part[]
00335 , const EPartitionOrder partition_order );
00336
00342 void bind(const COOMatrixPartitionedView& coom_view);
00343
00345 void free();
00346
00348 bool is_initialized() const;
00349
00351
00361
00363 size_type rows() const;
00364
00366 size_type cols() const;
00367
00369 size_type nz() const;
00370
00372 size_type num_row_part() const;
00373
00375 size_type num_col_part() const;
00376
00382 void get_row_part(indice_type row_part[]) const;
00383
00389 void get_col_part(indice_type col_part[]) const;
00390
00392 EPartitionOrder partition_order() const;
00393
00397 size_type overall_part_num(size_type row_p, size_type col_p) const;
00398
00400 size_type row_part_num(size_type overall_p) const;
00401
00403 size_type col_part_num(size_type overall_p) const;
00404
00406
00416
00417
00418
00419
00420
00421
00422
00423
00424
00425
00426
00427
00430 partition_type operator()();
00431
00433 const partition_type operator()() const;
00434
00437 partition_type partition(size_type overall_p);
00438
00440 const partition_type partition(size_type overall_p) const;
00441
00445 partition_type partition(size_type row_p, size_type col_p);
00446
00448 const partition_type partition(size_type row_p, size_type col_p) const;
00449
00463 partition_type partition(Range1D rng_overall_p);
00464
00466 const partition_type partition(Range1D rng_overall_p) const;
00467
00469
00471
00472 private:
00473
00474
00475
00476 typedef SparseCOOPtrElement<T_Indice,T_Value> element_type;
00477 typedef std::vector<indice_type> vector_indice_type;
00478 typedef std::vector<size_type> vector_size_type;
00479 typedef std::vector<element_type> ele_type;
00480 typedef MemMngPack::RefCount<
00481 vector_indice_type> ref_vector_indice_type;
00482 typedef MemMngPack::RefCount<
00483 vector_size_type> ref_vector_size_type;
00484 typedef MemMngPack::RefCount<
00485 ele_type> ref_ele_type;
00486
00487
00488
00489
00490 size_type num_row_part_;
00491
00492
00493 size_type num_col_part_;
00494
00495
00496 ref_vector_size_type ref_row_part_;
00497
00498
00499
00500
00501
00502
00503
00504
00505
00506
00507
00508
00509 ref_vector_size_type ref_col_part_;
00510
00511
00512
00513
00514
00515
00516
00517
00518
00519
00520
00521
00522 EPartitionOrder partition_order_;
00523
00524
00525 ref_ele_type ref_ele_;
00526
00527
00528
00529
00530
00531
00532
00533
00534
00535
00536
00537
00538
00539
00540
00541
00542
00543
00544
00545
00546
00547
00548
00549
00550 ref_vector_size_type ref_part_start_;
00551
00552
00553
00554
00555
00556
00557
00558
00559
00560
00561
00562
00563
00564
00565
00566
00567
00568
00569 void assert_initialized() const;
00570
00571 size_type imp_overall_part_num(size_type row_p, size_type col_p) const;
00572
00573 size_type imp_row_part_num(size_type overall_p) const;
00574
00575 size_type imp_col_part_num(size_type overall_p) const;
00576
00577
00578
00579
00580
00581
00582 size_type part_num(const vector_size_type& part, size_type indice);
00583
00584
00585 size_type overall_p_from_ij(const vector_size_type& row_part
00586 , const vector_size_type& col_part, size_type i, size_type j);
00587
00588
00589
00590 partition_type create_partition(Range1D rng_overall_p) const;
00591
00592
00593 COOMatrixPartitionedView& operator=(const COOMatrixPartitionedView&);
00594
00595 };
00596
00597
00598 namespace COOMatrixPartitionedViewUtilityPack {
00599
00604
00605
00606
00619 template <class T_Indice, class T_Value>
00620 class Partition {
00621 public:
00622
00625
00627 typedef AbstractLinAlgPack::size_type size_type;
00629 typedef Partition<T_Indice,T_Value> partition_type;
00631 typedef ptrdiff_t difference_type;
00633 typedef SparseCOOPtrElement<T_Indice,T_Value> element_type;
00635 typedef element_type* iterator;
00637 typedef const element_type* const_iterator;
00638
00640
00641
00644
00651
00663 Partition();
00664
00669 Partition(
00670 size_type rows
00671 , size_type cols
00672 , size_type nz
00673 , element_type* ele
00674 , difference_type row_offset
00675 , difference_type col_offset );
00676
00688 void initialize(
00689 size_type rows
00690 , size_type cols
00691 , size_type nz
00692 , element_type* ele
00693 , difference_type row_offset
00694 , difference_type col_offset );
00695
00700 void bind(const partition_type& partition);
00701
00703
00706
00708 size_type rows() const;
00710 size_type cols() const ;
00712 size_type nz() const;
00714 difference_type row_offset() const;
00716 difference_type col_offset() const;
00718 iterator begin();
00720 const_iterator begin() const;
00722 iterator end();
00724 const_iterator end() const;
00725
00727
00729
00730 private:
00731
00732
00733
00734
00735
00736
00737 size_type rows_,
00738 cols_,
00739 nz_;
00740 element_type *ele_;
00741 difference_type row_offset_,
00742 col_offset_;
00743
00744
00745
00746
00747
00748 void assert_initialized() const;
00749
00750
00751 Partition& operator=(const Partition&);
00752
00753 };
00754
00755
00756
00778 template <class T_Indice, class T_Value>
00779 class TransposedPartition {
00780 public:
00781
00784
00786 typedef Partition<T_Indice,T_Value> partition_type;
00788 typedef AbstractLinAlgPack::size_type size_type;
00790 typedef ptrdiff_t difference_type;
00792 typedef SparseCOOPtrElement<T_Indice,T_Value> element_type;
00794 typedef TransSparseCOOElementViewIter<
00795 element_type*
00796 , std::random_access_iterator_tag
00797 , typename element_type::indice_type
00798 , typename element_type::value_type&
00799 , difference_type> iterator;
00801 typedef TransSparseCOOElementViewIter<
00802 const element_type*
00803 , std::random_access_iterator_tag
00804 , typename element_type::indice_type
00805 , const typename element_type::value_type&
00806 , difference_type> const_iterator;
00807
00809
00810
00813
00820
00825 TransposedPartition(const partition_type& partition);
00826
00831 void bind(const partition_type& partition);
00832
00834
00837
00839 size_type rows() const;
00841 size_type cols() const;
00843 size_type nz() const;
00845 difference_type row_offset() const;
00847 difference_type col_offset() const;
00849 iterator begin();
00851 const_iterator begin() const;
00853 iterator end();
00855 const_iterator end() const;
00856
00858
00860
00861 private:
00862 partition_type partition_;
00863
00864
00865 TransposedPartition& operator=(const TransposedPartition&);
00866
00867 };
00868
00869
00871
00872 }
00873
00874
00875
00876
00877
00880 template<class T_Indice, class T_Value>
00881 inline COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>
00882 trans(COOMatrixPartitionedViewUtilityPack::Partition<T_Indice,T_Value>& part)
00883 {
00884 typedef COOMatrixPartitionedViewUtilityPack::TransposedPartition<T_Indice,T_Value>
00885 transposed_partition_type;
00886 return transposed_partition_type(part);
00887 }
00888
00889
00890
00891
00892 namespace COOMatrixPartitionedViewUtilityPack {
00893
00894
00895
00896
00897
00898
00899 template <class T_Indice, class T_Value>
00900 inline Partition<T_Indice,T_Value>::Partition()
00901 : rows_(0), cols_(0), nz_(0), ele_(0), row_offset_(0), col_offset_(0)
00902 {}
00903
00904 template <class T_Indice, class T_Value>
00905 inline Partition<T_Indice,T_Value>::Partition(
00906 size_type rows
00907 , size_type cols
00908 , size_type nz
00909 , element_type* ele
00910 , difference_type row_offset
00911 , difference_type col_offset )
00912 : rows_(rows), cols_(cols), nz_(nz), ele_(ele), row_offset_(row_offset)
00913 , col_offset_(col_offset)
00914 {}
00915
00916 template <class T_Indice, class T_Value>
00917 inline void Partition<T_Indice,T_Value>::initialize(
00918 size_type rows
00919 , size_type cols
00920 , size_type nz
00921 , element_type* ele
00922 , difference_type row_offset
00923 , difference_type col_offset )
00924 {
00925 rows_ = rows;
00926 cols_ = cols;
00927 nz_ = nz;
00928 ele_ = ele;
00929 row_offset_ = row_offset;
00930 col_offset_ = col_offset;
00931 }
00932
00933 template <class T_Indice, class T_Value>
00934 inline void Partition<T_Indice,T_Value>::bind(const partition_type& partition) {
00935 initialize(partition.rows_,partition.cols_,partition.nz_,partition.ele_
00936 ,partition.row_offset_,partition.col_offset_);
00937 }
00938
00939
00940
00941 template <class T_Indice, class T_Value>
00942 inline Partition<T_Indice,T_Value>::size_type
00943 Partition<T_Indice,T_Value>::rows() const
00944 {
00945 return rows_;
00946 }
00947
00948 template <class T_Indice, class T_Value>
00949 inline Partition<T_Indice,T_Value>::size_type
00950 Partition<T_Indice,T_Value>::cols() const
00951 {
00952 return cols_;
00953 }
00954
00955 template <class T_Indice, class T_Value>
00956 inline Partition<T_Indice,T_Value>::size_type
00957 Partition<T_Indice,T_Value>::nz() const
00958 {
00959 return nz_;
00960 }
00961
00962 template <class T_Indice, class T_Value>
00963 inline Partition<T_Indice,T_Value>::difference_type
00964 Partition<T_Indice,T_Value>::row_offset() const
00965 {
00966 return row_offset_;
00967 }
00968
00969 template <class T_Indice, class T_Value>
00970 inline Partition<T_Indice,T_Value>::difference_type
00971 Partition<T_Indice,T_Value>::col_offset() const
00972 {
00973 return col_offset_;
00974 }
00975
00976 template <class T_Indice, class T_Value>
00977 inline Partition<T_Indice,T_Value>::iterator
00978 Partition<T_Indice,T_Value>::begin()
00979 {
00980 assert_initialized();
00981 return ele_;
00982 }
00983
00984 template <class T_Indice, class T_Value>
00985 inline Partition<T_Indice,T_Value>::const_iterator
00986 Partition<T_Indice,T_Value>::begin() const
00987 {
00988 assert_initialized();
00989 return ele_;
00990 }
00991
00992 template <class T_Indice, class T_Value>
00993 inline Partition<T_Indice,T_Value>::iterator
00994 Partition<T_Indice,T_Value>::end()
00995 {
00996 assert_initialized();
00997 return ele_ + nz_;
00998 }
00999
01000 template <class T_Indice, class T_Value>
01001 inline Partition<T_Indice,T_Value>::const_iterator
01002 Partition<T_Indice,T_Value>::end() const
01003 {
01004 assert_initialized();
01005 return ele_ + nz_;
01006 }
01007
01008
01009
01010 template <class T_Indice, class T_Value>
01011 inline void Partition<T_Indice,T_Value>::assert_initialized() const {
01012 if(!ele_)
01013 throw std::logic_error("Partition<...> :"
01014 "The COO matrix was not initizlized");
01015 }
01016
01017
01018
01019
01020
01021
01022
01023 template <class T_Indice, class T_Value>
01024 inline TransposedPartition<T_Indice,T_Value>::TransposedPartition(const partition_type& partition)
01025 : partition_(partition)
01026 {}
01027
01028 template <class T_Indice, class T_Value>
01029 inline void TransposedPartition<T_Indice,T_Value>::bind(const partition_type& partition) {
01030 partition_.bind(partition);
01031 }
01032
01033
01034
01035 template <class T_Indice, class T_Value>
01036 inline TransposedPartition<T_Indice,T_Value>::size_type
01037 TransposedPartition<T_Indice,T_Value>::rows() const
01038 {
01039 return partition_.cols();
01040 }
01041
01042 template <class T_Indice, class T_Value>
01043 inline TransposedPartition<T_Indice,T_Value>::size_type
01044 TransposedPartition<T_Indice,T_Value>::cols() const
01045 {
01046 return partition_.rows();
01047 }
01048
01049 template <class T_Indice, class T_Value>
01050 inline TransposedPartition<T_Indice,T_Value>::size_type
01051 TransposedPartition<T_Indice,T_Value>::nz() const
01052 {
01053 return partition_.nz();
01054 }
01055
01056 template <class T_Indice, class T_Value>
01057 inline TransposedPartition<T_Indice,T_Value>::difference_type
01058 TransposedPartition<T_Indice,T_Value>::row_offset() const
01059 {
01060 return partition_.col_offset();
01061 }
01062
01063 template <class T_Indice, class T_Value>
01064 inline TransposedPartition<T_Indice,T_Value>::difference_type
01065 TransposedPartition<T_Indice,T_Value>::col_offset() const
01066 {
01067 return partition_.row_offset();
01068 }
01069
01070 template <class T_Indice, class T_Value>
01071 inline TransposedPartition<T_Indice,T_Value>::iterator
01072 TransposedPartition<T_Indice,T_Value>::begin()
01073 {
01074 return iterator(partition_.begin());
01075 }
01076
01077 template <class T_Indice, class T_Value>
01078 inline TransposedPartition<T_Indice,T_Value>::const_iterator
01079 TransposedPartition<T_Indice,T_Value>::begin() const
01080 {
01081 return const_iterator(partition_.begin());
01082 }
01083
01084 template <class T_Indice, class T_Value>
01085 inline TransposedPartition<T_Indice,T_Value>::iterator
01086 TransposedPartition<T_Indice,T_Value>::end()
01087 {
01088 return iterator(partition_.end());
01089 }
01090
01091 template <class T_Indice, class T_Value>
01092 inline TransposedPartition<T_Indice,T_Value>::const_iterator
01093 TransposedPartition<T_Indice,T_Value>::end() const
01094 {
01095 return const_iterator(partition_.end());
01096 }
01097
01098 }
01099
01100
01101
01102
01103
01104
01105
01106 template <class T_Indice, class T_Value>
01107 inline COOMatrixPartitionedView<T_Indice,T_Value>::COOMatrixPartitionedView()
01108 : num_row_part_(0), num_col_part_(0)
01109 {}
01110
01111 template <class T_Indice, class T_Value>
01112 inline bool COOMatrixPartitionedView<T_Indice,T_Value>::is_initialized() const {
01113 return ref_ele_.has_ref_set();
01114 }
01115
01116
01117
01118 template <class T_Indice, class T_Value>
01119 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01120 COOMatrixPartitionedView<T_Indice,T_Value>::rows() const
01121 {
01122 assert_initialized();
01123 const std::vector<size_type> &row_part = ref_row_part_.const_obj();
01124 return row_part[num_row_part_] - row_part[0];
01125 }
01126
01127 template <class T_Indice, class T_Value>
01128 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01129 COOMatrixPartitionedView<T_Indice,T_Value>::cols() const
01130 {
01131 assert_initialized();
01132 const std::vector<size_type> &col_part = ref_col_part_.const_obj();
01133 return col_part[num_col_part_] - col_part[0];
01134 }
01135
01136 template <class T_Indice, class T_Value>
01137 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01138 COOMatrixPartitionedView<T_Indice,T_Value>::nz() const
01139 {
01140 assert_initialized();
01141 return ref_part_start_.const_obj()[num_row_part_ * num_col_part_];
01142 }
01143
01144 template <class T_Indice, class T_Value>
01145 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01146 COOMatrixPartitionedView<T_Indice,T_Value>::num_row_part() const
01147 {
01148 return num_row_part_;
01149 }
01150
01151 template <class T_Indice, class T_Value>
01152 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01153 COOMatrixPartitionedView<T_Indice,T_Value>::num_col_part() const
01154 {
01155 return num_col_part_;
01156 }
01157
01158 template <class T_Indice, class T_Value>
01159 inline COOMatrixPartitionedView<T_Indice,T_Value>::EPartitionOrder
01160 COOMatrixPartitionedView<T_Indice,T_Value>::partition_order() const
01161 {
01162 assert_initialized();
01163 return partition_order_;
01164 }
01165
01166 template <class T_Indice, class T_Value>
01167 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01168 COOMatrixPartitionedView<T_Indice,T_Value>::overall_part_num(size_type row_p, size_type col_p) const
01169 {
01170 assert_initialized();
01171 return imp_overall_part_num(row_p, col_p);
01172 }
01173
01174 template <class T_Indice, class T_Value>
01175 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01176 COOMatrixPartitionedView<T_Indice,T_Value>::row_part_num(size_type overall_p) const
01177 {
01178 assert_initialized();
01179 return imp_row_part_num(overall_p);
01180 }
01181
01182 template <class T_Indice, class T_Value>
01183 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01184 COOMatrixPartitionedView<T_Indice,T_Value>::col_part_num(size_type overall_p) const
01185 {
01186 assert_initialized();
01187 return imp_col_part_num(overall_p);
01188 }
01189
01190
01191
01192
01193
01194
01195
01196
01197
01198
01199
01200
01201
01202
01203
01204
01205
01206 template <class T_Indice, class T_Value>
01207 inline COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01208 COOMatrixPartitionedView<T_Indice,T_Value>::operator()()
01209 {
01210 return partition(Range1D());
01211 }
01212
01213 template <class T_Indice, class T_Value>
01214 inline const COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01215 COOMatrixPartitionedView<T_Indice,T_Value>::operator()() const
01216 {
01217 return partition(Range1D());
01218 }
01219
01220 template <class T_Indice, class T_Value>
01221 inline COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01222 COOMatrixPartitionedView<T_Indice,T_Value>::partition(size_type overall_p)
01223 {
01224 return partition(Range1D(overall_p,overall_p));
01225 }
01226
01227 template <class T_Indice, class T_Value>
01228 inline const COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01229 COOMatrixPartitionedView<T_Indice,T_Value>::partition(size_type overall_p) const
01230 {
01231 return partition(Range1D(overall_p,overall_p));
01232 }
01233
01234 template <class T_Indice, class T_Value>
01235 inline COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01236 COOMatrixPartitionedView<T_Indice,T_Value>::partition(size_type row_p, size_type col_p)
01237 {
01238 return partition(overall_part_num(row_p,col_p));
01239 }
01240
01241 template <class T_Indice, class T_Value>
01242 inline const COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01243 COOMatrixPartitionedView<T_Indice,T_Value>::partition(size_type row_p, size_type col_p) const
01244 {
01245 return partition(overall_part_num(row_p,col_p));
01246 }
01247
01248 template <class T_Indice, class T_Value>
01249 inline COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01250 COOMatrixPartitionedView<T_Indice,T_Value>::partition(Range1D rng_overall_p)
01251 {
01252 return create_partition(rng_overall_p);
01253 }
01254
01255 template <class T_Indice, class T_Value>
01256 inline const COOMatrixPartitionedView<T_Indice,T_Value>::partition_type
01257 COOMatrixPartitionedView<T_Indice,T_Value>::partition(Range1D rng_overall_p) const
01258 {
01259 return create_partition(rng_overall_p);
01260 }
01261
01262
01263
01264 template <class T_Indice, class T_Value>
01265 inline void COOMatrixPartitionedView<T_Indice,T_Value>::assert_initialized() const {
01266 if(!is_initialized())
01267 throw UninitializedException("COOMatrixPartitionedView<..>::assert_initialized() :"
01268 " The partitioned view has not been initialized.");
01269 }
01270
01271 template <class T_Indice, class T_Value>
01272 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01273 COOMatrixPartitionedView<T_Indice,T_Value>::imp_overall_part_num(size_type row_p, size_type col_p) const
01274 {
01275 return (partition_order_ == PARTITION_BY_ROW) ?
01276 (row_p - 1) * num_col_part_ + col_p :
01277 (col_p - 1) * num_row_part_ + row_p;
01278 }
01279
01280 template <class T_Indice, class T_Value>
01281 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01282 COOMatrixPartitionedView<T_Indice,T_Value>::imp_row_part_num(size_type overall_p) const
01283 {
01284 return (partition_order_ == PARTITION_BY_ROW) ?
01285 (overall_p - 1) / num_col_part_ + 1 :
01286 (overall_p - 1) % num_row_part_ + 1 ;
01287 }
01288
01289 template <class T_Indice, class T_Value>
01290 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01291 COOMatrixPartitionedView<T_Indice,T_Value>::imp_col_part_num(size_type overall_p) const
01292 {
01293 return (partition_order_ == PARTITION_BY_COL) ?
01294 (overall_p - 1) / num_row_part_ + 1 :
01295 (overall_p - 1) % num_col_part_ + 1 ;
01296 }
01297
01298 template <class T_Indice, class T_Value>
01299 inline COOMatrixPartitionedView<T_Indice,T_Value>::size_type
01300 COOMatrixPartitionedView<T_Indice,T_Value>::overall_p_from_ij(const vector_size_type& row_part
01301 , const vector_size_type& col_part, size_type i, size_type j)
01302 {
01303 return imp_overall_part_num( part_num(row_part,i)
01304 , part_num(col_part,j) );
01305 }
01306
01307 }
01308
01309 #endif // COO_MATRIX_PARTITIONED_VIEW_CLASS_DECL_H