|
@@ -29,8 +29,6 @@
|
|
|
#include <artis/kernel/States.hpp>
|
|
|
#include <artis/utils/Exception.hpp>
|
|
|
|
|
|
-#include <vector>
|
|
|
-
|
|
|
namespace artis { namespace kernel {
|
|
|
|
|
|
template < typename T, typename U, typename V >
|
|
@@ -85,47 +83,12 @@ public:
|
|
|
bool is_computed(typename U::type t, unsigned int /* index */) const
|
|
|
{ return type::last_time == t; }
|
|
|
|
|
|
- // bool is_ready(typename U::type t, unsigned int index) const
|
|
|
- // { return type::externalDates.at(index) == t; }
|
|
|
-
|
|
|
- // bool is_readyV(typename U::type t, unsigned int index) const
|
|
|
- // { return type::externalDatesV.at(index) == t; }
|
|
|
-
|
|
|
bool is_stable(typename U::type t) const
|
|
|
{ return type::last_time == t; }
|
|
|
|
|
|
virtual bool is_updated() const
|
|
|
{ return Externals < T, U >::updated; }
|
|
|
|
|
|
- // void put(typename U::type t, unsigned int index, double value)
|
|
|
- // {
|
|
|
- // if (type::externalDates.at(index) != t) {
|
|
|
- // static_cast < T* >(this)->*externals.at(index) = value;
|
|
|
- // type::externalDates.at(index) = t;
|
|
|
- // type::updated = true;
|
|
|
- // } else {
|
|
|
- // if (static_cast < T* >(this)->*externals.at(index) != value) {
|
|
|
- // static_cast < T* >(this)->*externals.at(index) = value;
|
|
|
- // type::updated = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
- // void put(typename U::type t, unsigned int index,
|
|
|
- // const std::vector < double >& value)
|
|
|
- // {
|
|
|
- // if (type::externalDatesV.at(index) != t) {
|
|
|
- // static_cast < T* >(this)->*externalsV.at(index) = value;
|
|
|
- // type::externalDatesV.at(index) = t;
|
|
|
- // type::updated = true;
|
|
|
- // } else {
|
|
|
- // if (static_cast < T* >(this)->*externalsV.at(index) != value) {
|
|
|
- // static_cast < T* >(this)->*externalsV.at(index) = value;
|
|
|
- // type::updated = true;
|
|
|
- // }
|
|
|
- // }
|
|
|
- // }
|
|
|
-
|
|
|
virtual void restore(const State < U >& state)
|
|
|
{
|
|
|
States < T, U >::restore(state);
|
|
@@ -142,31 +105,6 @@ public:
|
|
|
|
|
|
virtual void stable()
|
|
|
{ Externals < T, U >::updated = false; }
|
|
|
-
|
|
|
-protected:
|
|
|
- // void external(unsigned int index, double T::* var)
|
|
|
- // {
|
|
|
- // if (externals.size() <= index) {
|
|
|
- // externals.resize(index + 1);
|
|
|
- // type::externalDates.resize(index + 1);
|
|
|
- // }
|
|
|
- // externals[index] = var;
|
|
|
- // type::externalDates[index] = -1;
|
|
|
- // }
|
|
|
-
|
|
|
- // void externalV(unsigned int index, std::vector < double > T::* var)
|
|
|
- // {
|
|
|
- // if (externalsV.size() <= index) {
|
|
|
- // externalsV.resize(index + 1);
|
|
|
- // type::externalDatesV.resize(index + 1);
|
|
|
- // }
|
|
|
- // externalsV[index] = var;
|
|
|
- // type::externalDatesV[index] = -1;
|
|
|
- // }
|
|
|
-
|
|
|
-private:
|
|
|
- // std::vector < double T::* > externals;
|
|
|
- // std::vector < std::vector < double > T::* > externalsV;
|
|
|
};
|
|
|
|
|
|
template < typename T, typename U, typename V >
|