Rcpp Version 1.0.7
convolve10_cpp.h
Go to the documentation of this file.
1 
2 class Cache{
3 public:
4  typedef double& proxy ;
5  typedef double* iterator ;
6 
7  Cache( iterator data_) : data(data_){}
8 
9  inline proxy ref(int i){ return data[i] ; }
10  inline proxy ref(int i) const { return data[i] ; }
11 
12 private:
14 } ;
15 
16 class Vec {
17 public:
18  typedef double& proxy ;
19 
20  Vec( double* data_ ) : cache(data_){}
21  inline proxy operator[]( int i){ return cache.ref(i) ; }
22  inline proxy operator[]( int i) const { return cache.ref(i) ; }
23 
24 private:
26 } ;
27 
Vec::operator[]
proxy operator[](int i) const
Definition: convolve10_cpp.h:22
Vec::Vec
Vec(double *data_)
Definition: convolve10_cpp.h:20
Cache::ref
proxy ref(int i) const
Definition: convolve10_cpp.h:10
Cache::Cache
Cache(iterator data_)
Definition: convolve10_cpp.h:7
Cache::iterator
double * iterator
Definition: convolve10_cpp.h:5
Cache::data
iterator data
Definition: convolve10_cpp.h:13
Vec
Definition: convolve10_cpp.h:16
Vec::operator[]
proxy operator[](int i)
Definition: convolve10_cpp.h:21
Cache::proxy
double & proxy
Definition: convolve10_cpp.h:4
Cache::ref
proxy ref(int i)
Definition: convolve10_cpp.h:9
Vec::cache
Cache cache
Definition: convolve10_cpp.h:25
Cache
Definition: convolve10_cpp.h:2
Vec::proxy
double & proxy
Definition: convolve10_cpp.h:18