1 #ifndef TIL_SPARSE_VECTOR_POLICIES_H 2 #define TIL_SPARSE_VECTOR_POLICIES_H 14 namespace til {
namespace policy
18 template <
typename T >
22 {
Exception(
const std::string & msg) : std::runtime_error(msg) {} };
31 std::cerr <<
"Can't change baseline value to " << value << std::endl;
32 throw Exception(
"Can't change baseline value");
38 template <
typename T >
42 {
Exception(
const std::string & msg) : std::runtime_error(msg) {} };
void setValue(const T &value)
Belongs to package Box Do not include directly, include til/Box.h instead.
SVBaseline_Value(const T &value)
Exception(const std::string &msg)
Take the default value of type T as the baseline value of a sparse vector.
void setValue(const T &value)
T operator()(std::size_t) const
Get default value at current position.
T operator()(std::size_t) const
Get default value at current position.
Exception(const std::string &msg)