Skip to content

Commit a5bd636

Browse files
cleaning
1 parent dd8e70c commit a5bd636

File tree

15 files changed

+171
-61
lines changed

15 files changed

+171
-61
lines changed

inst/include/Rcpp/Vector.h

Lines changed: 8 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -30,44 +30,37 @@ namespace Rcpp{
3030
namespace traits{
3131
template <int RTYPE, bool NA, typename VECTOR> struct Extractor ;
3232
}
33-
}
33+
template <int RTYPE> class MatrixRow ;
34+
template <int RTYPE> class MatrixColumn ;
35+
template <int RTYPE> class SubMatrix ;
3436

35-
namespace Rcpp{
37+
class Dimension ;
38+
template <bool NA,typename T> class SingleLogicalResult ;
3639

37-
#include <Rcpp/vector/00_forward_Vector.h>
3840
}
41+
42+
#include <Rcpp/vector/00_forward_Vector.h>
3943
#include <Rcpp/vector/no_init.h>
40-
namespace Rcpp{
44+
4145
#include <Rcpp/vector/00_forward_proxy.h>
4246
#include <Rcpp/vector/vector_from_string.h>
4347

4448
#include <Rcpp/vector/converter.h>
45-
46-
template <int RTYPE> class MatrixRow ;
47-
template <int RTYPE> class MatrixColumn ;
48-
template <int RTYPE> class SubMatrix ;
49-
5049
#include <Rcpp/vector/RangeIndexer.h>
51-
5250
#include <Rcpp/vector/Vector.h>
53-
5451
#include <Rcpp/vector/proxy.h>
5552
#include <Rcpp/vector/traits.h>
56-
5753
#include <Rcpp/vector/Matrix.h>
5854
#include <Rcpp/vector/SubMatrix.h>
5955
#include <Rcpp/vector/MatrixRow.h>
6056
#include <Rcpp/vector/MatrixColumn.h>
61-
6257
#include <Rcpp/vector/instantiation.h>
63-
}
6458

6559
#include <Rcpp/vector/string_proxy.h>
6660
#include <Rcpp/vector/const_string_proxy.h>
6761
#include <Rcpp/vector/generic_proxy.h>
6862
#include <Rcpp/vector/const_generic_proxy.h>
6963

70-
7164
#include <Rcpp/String.h>
7265
#include <Rcpp/vector/LazyVector.h>
7366
#include <Rcpp/vector/swap.h>

inst/include/Rcpp/vector/00_forward_Vector.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
#ifndef Rcpp__vector__forward_Vector_h
2323
#define Rcpp__vector__forward_Vector_h
2424

25-
template <int RTYPE, template <class> class StoragePolicy> class Vector ;
26-
25+
namespace Rcpp{
26+
template <int RTYPE, template <class> class StoragePolicy> class Vector ;
27+
}
2728
#endif

inst/include/Rcpp/vector/00_forward_proxy.h

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
// -*- mode: C++; c-indent-level: 4; c-basic-offset: 4; tab-width: 8 -*-
22
//
3-
// proxy.h: Rcpp R/C++ interface class library -- proxies
3+
// 00_forward_proxy.h: Rcpp R/C++ interface class library -- proxies
44
//
5-
// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -22,6 +22,8 @@
2222
#ifndef Rcpp__vector__forward_proxy_h
2323
#define Rcpp__vector__forward_proxy_h
2424

25+
namespace Rcpp{
26+
2527
namespace internal{
2628
template <int RTYPE> class string_proxy ;
2729
template <int RTYPE> class const_string_proxy ;
@@ -44,6 +46,6 @@ namespace traits {
4446
template <int RTYPE> struct r_vector_const_iterator ;
4547

4648
}
47-
49+
}
4850

4951
#endif

inst/include/Rcpp/vector/Matrix.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,8 @@
2222
#ifndef Rcpp__vector__Matrix_h
2323
#define Rcpp__vector__Matrix_h
2424

25-
class Dimension ;
26-
25+
namespace Rcpp{
26+
2727
template <int RTYPE, template <class> class StoragePolicy = PreserveStorage >
2828
class Matrix : public Vector<RTYPE, StoragePolicy>, public MatrixBase<RTYPE, true, Matrix<RTYPE,StoragePolicy> > {
2929
int nrows ;
@@ -118,5 +118,6 @@ class Matrix : public Vector<RTYPE, StoragePolicy>, public MatrixBase<RTYPE, tru
118118

119119
} ;
120120

121+
}
121122

122123
#endif

inst/include/Rcpp/vector/MatrixColumn.h

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// MatrixColumn.h: Rcpp R/C++ interface class library -- matrices column
44
//
5-
// Copyright (C) 2010 - 2012 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -21,7 +21,9 @@
2121

2222
#ifndef Rcpp__vector__MatrixColumn_h
2323
#define Rcpp__vector__MatrixColumn_h
24-
24+
25+
namespace Rcpp{
26+
2527
template <int RTYPE>
2628
class MatrixColumn : public VectorBase<RTYPE,true,MatrixColumn<RTYPE> > {
2729
public:
@@ -101,4 +103,5 @@ class MatrixColumn : public VectorBase<RTYPE,true,MatrixColumn<RTYPE> > {
101103

102104
} ;
103105

106+
}
104107
#endif

inst/include/Rcpp/vector/MatrixRow.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,9 @@
2121

2222
#ifndef Rcpp__vector__MatrixRow_h
2323
#define Rcpp__vector__MatrixRow_h
24-
24+
25+
namespace Rcpp{
26+
2527
template <int RTYPE>
2628
class MatrixRow : public VectorBase< RTYPE, true, MatrixRow<RTYPE> > {
2729
public:
@@ -168,5 +170,6 @@ class MatrixRow : public VectorBase< RTYPE, true, MatrixRow<RTYPE> > {
168170
return i * parent_nrow ;
169171
}
170172
} ;
173+
}
171174

172175
#endif

inst/include/Rcpp/vector/RangeIndexer.h

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
}
4747

4848

49-
49+
namespace Rcpp{
5050
namespace internal{
5151

5252
template <int RTYPE, bool NA, typename VECTOR>
@@ -55,11 +55,9 @@ class RangeIndexer : public VectorBase<RTYPE, NA, RangeIndexer<RTYPE,NA,VECTOR>
5555
typedef typename VECTOR::Proxy Proxy ;
5656
typedef typename VECTOR::iterator iterator ;
5757

58-
// TODO: check if the indexer is valid
5958
RangeIndexer( VECTOR& vec_, const Rcpp::Range& range_) :
6059
start(vec_.begin() + range_.get_start() ), size_( range_.size() ) {}
6160

62-
// TODO: size exceptions
6361
template <bool NA_, typename T>
6462
RangeIndexer& operator=( const Rcpp::VectorBase<RTYPE,NA_,T>& x){
6563
UNROLL_LOOP(=)
@@ -98,6 +96,7 @@ class RangeIndexer : public VectorBase<RTYPE, NA, RangeIndexer<RTYPE,NA,VECTOR>
9896
int size_ ;
9997
} ;
10098

99+
}
101100
}
102101

103102
#undef UNROLL_LOOP

inst/include/Rcpp/vector/SubMatrix.h

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// SubMatrix.h: Rcpp R/C++ interface class library -- sub matrices
44
//
5-
// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -22,6 +22,8 @@
2222
#ifndef Rcpp__vector__SubMatrix_h
2323
#define Rcpp__vector__SubMatrix_h
2424

25+
namespace Rcpp{
26+
2527
template <int RTYPE>
2628
class SubMatrix : public Rcpp::MatrixBase< RTYPE, true, SubMatrix<RTYPE> > {
2729
public:
@@ -100,5 +102,6 @@ RCPP_WRAP_SUBMATRIX(RAWSXP)
100102
// RCPP_WRAP_SUBMATRIX(EXPRSXP)
101103
#undef RCPP_WRAP_SUBMATRIX
102104

105+
}
103106

104107
#endif

inst/include/Rcpp/vector/Vector.h

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@
2222
#ifndef Rcpp__vector__Vector_h
2323
#define Rcpp__vector__Vector_h
2424

25-
// forward declarations
26-
class Dimension ;
27-
28-
template <bool NA,typename T> class SingleLogicalResult ;
25+
namespace Rcpp{
2926

3027
template <int RTYPE, template <class> class StoragePolicy = PreserveStorage >
3128
class Vector :
@@ -479,4 +476,6 @@ class Vector :
479476

480477
} ; /* Vector */
481478

479+
}
480+
482481
#endif

inst/include/Rcpp/vector/converter.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
//
33
// converter.h: Rcpp R/C++ interface class library -- converters
44
//
5-
// Copyright (C) 2010 - 2011 Dirk Eddelbuettel and Romain Francois
5+
// Copyright (C) 2010 - 2013 Dirk Eddelbuettel and Romain Francois
66
//
77
// This file is part of Rcpp.
88
//
@@ -21,7 +21,8 @@
2121

2222
#ifndef Rcpp__vector__converters_h
2323
#define Rcpp__vector__converters_h
24-
24+
25+
namespace Rcpp{
2526
namespace internal {
2627
template <int RTYPE>
2728
class element_converter{
@@ -103,5 +104,6 @@ namespace traits{
103104
typedef ::Rcpp::internal::generic_element_converter<EXPRSXP> type ;
104105
} ;
105106
}
107+
}
106108

107109
#endif

0 commit comments

Comments
 (0)