32 const std::string& name,
37 matrix =
doubles[std::make_pair(name, type)];
39 throw std::runtime_error(
"No attribute named " + name);
44 const std::string& name,
49 matrix =
int64_ts[std::make_pair(name, type)];
51 throw std::runtime_error(
"No attribute named " + name);
56 const std::string& name,
60 if (
chars.find(std::make_pair(name, type)) !=
chars.end()) {
61 matrix =
chars[std::make_pair(name, type)];
63 throw std::runtime_error(
"No attribute named " + name);
68 const std::string& name,
73 matrix =
Rationals[std::make_pair(name, type)];
75 throw std::runtime_error(
"No attribute named " + name);
81 std::map<std::pair<std::string, PrimitiveType>,
MatrixX<T>>& Ts,
82 const std::string& name,
85 const std::vector<T>& val,
91 MapType(val.data(), stride, val.size() / stride).transpose();
95 const std::string& name,
98 const std::vector<char>& val,
99 const char default_val)
105 const std::string& name,
107 const int64_t stride,
108 const std::vector<int64_t>& val,
109 const int64_t default_val)
115 const std::string& name,
117 const int64_t stride,
118 const std::vector<double>& val,
119 const double default_val)
125 const std::string& name,
127 const int64_t stride,
128 const std::vector<Rational>& val,
std::map< std::pair< std::string, PrimitiveType >, MatrixX< double > > doubles
std::map< std::pair< std::string, PrimitiveType >, MatrixX< char > > chars
void get_position_matrix(MatrixX< double > &matrix)
std::map< std::pair< std::string, PrimitiveType >, MatrixX< int64_t > > int64_ts
void write_internal(std::map< std::pair< std::string, PrimitiveType >, MatrixX< T >> &Ts, const std::string &name, const int64_t type, const int64_t stride, const std::vector< T > &val, const T &default_val)
void get_Rational_matrix(const std::string &name, const PrimitiveType type, MatrixX< Rational > &matrix)
void write_top_simplex_type(const PrimitiveType type) override
void get_EV_matrix(MatrixX< int64_t > &matrix)
void get_TV_matrix(MatrixX< int64_t > &matrix)
bool write(const int dim) override
void get_char_matrix(const std::string &name, const PrimitiveType type, MatrixX< char > &matrix)
void write_absolute_id(const std::vector< int64_t > &id) override
void get_int64_t_matrix(const std::string &name, const PrimitiveType type, MatrixX< int64_t > &matrix)
void get_FV_matrix(MatrixX< int64_t > &matrix)
void write_capacities(const std::vector< int64_t > &capacities) override
std::map< std::pair< std::string, PrimitiveType >, MatrixX< Rational > > Rationals
void get_double_matrix(const std::string &name, const PrimitiveType type, MatrixX< double > &matrix)
Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic > MatrixX