Commit 681d8c1d authored by Ludovic Courtès's avatar Ludovic Courtès

data: Remove operator[], which was inefficient and unused.

parent 727b4aa6
......@@ -56,7 +56,6 @@ class data : public parametrized
// Acces to data
virtual vec get(int i) const = 0 ;
virtual vec operator[](int i) const = 0 ;
//! \brief Provide an evaluation of the data using interpolation. If
//! the data object does not provide an interpolation mechanism, it
......@@ -154,10 +153,6 @@ class data_params : public data
{
return _data[i];
}
virtual vec operator[](int i) const
{
return this->get(i);
}
//! \todo This should crash at execution.
virtual void set(const vec& x)
......
......@@ -121,11 +121,7 @@ void vertical_segment::get(int i, vec& yl, vec& yu) const
yu[j] = _data[i][dimX() + 2*dimY() + j] ;
}
}
vec vertical_segment::operator[](int i) const
{
return _data[i] ;
}
vec vertical_segment::get(int i) const
{
//SLOW !!!!! and useless
......
......@@ -107,7 +107,6 @@ class vertical_segment : public data
// Acces to data
virtual vec get(int i) const ;
virtual vec operator[](int i) const;
virtual vec value(const vec&) const {
NOT_IMPLEMENTED();
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013, 2014 Inria
Copyright (C) 2013, 2014, 2015 Inria
This file is part of ALTA.
......@@ -108,10 +108,6 @@ vec data_interpolant::get(int id) const
vec res(dimX() + dimY()) ;
return res ;
}
vec data_interpolant::operator[](int i) const
{
return get(i) ;
}
//! \todo Test this function
void data_interpolant::set(const vec& x)
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013, 2014 Inria
Copyright (C) 2013, 2014, 2015 Inria
This file is part of ALTA.
......@@ -41,7 +41,6 @@ class data_interpolant : public data
// Acces to data
virtual vec get(int i) const ;
virtual vec operator[](int i) const ;
virtual vec value(const vec& x) const;
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013 Inria
Copyright (C) 2013, 2015 Inria
This file is part of ALTA.
......@@ -109,10 +109,6 @@ vec data_interpolant::get(int id) const
vec res(dimX() + dimY()) ;
return res ;
}
vec data_interpolant::operator[](int i) const
{
return get(i) ;
}
void data_interpolant::set(const vec& x)
{
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013, 2014 Inria
Copyright (C) 2013, 2014, 2015 Inria
This file is part of ALTA.
......@@ -38,7 +38,6 @@ class data_interpolant : public data
// Acces to data
virtual vec get(int i) const ;
virtual vec operator[](int i) const ;
virtual vec value(const vec& x) const;
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013, 2014 Inria
Copyright (C) 2013, 2014, 2015 Inria
This file is part of ALTA.
......@@ -95,10 +95,6 @@ public: //methods
{
return _data[i];
}
virtual vec operator[](int i) const
{
return _data[i];
}
virtual vec value(const vec& in) const
{
NOT_IMPLEMENTED();
......
......@@ -147,10 +147,6 @@ public: // methods
res[5] = brdf[i + BRDF_SAMPLING_RES_THETA_H*BRDF_SAMPLING_RES_THETA_D*BRDF_SAMPLING_RES_PHI_D] * BLUE_SCALE;
return res ;
}
vec operator[](int i) const
{
return get(i) ;
}
//! \todo Test this function
void set(const vec& x)
......
/* ALTA --- Analysis of Bidirectional Reflectance Distribution Functions
Copyright (C) 2013, 2014 Inria
Copyright (C) 2013, 2014, 2015 Inria
This file is part of ALTA.
......@@ -142,10 +142,6 @@ class BrdfSlice : public data {
return res ;
}
vec operator[](int i) const
{
return get(i) ;
}
//! \todo Test this function
void set(const vec& x)
......
......@@ -185,9 +185,6 @@ public:
return res;
}
virtual vec operator[](int i) const {
return get(i);
}
virtual void vecToIndex(const vec& in, int& iti, int& ipi, int& itv, int& ipv) const {
double theta_i = in[0];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment