7 #ifndef GRAPHGEN_CONNECTIVITY_MAT_H_
8 #define GRAPHGEN_CONNECTIVITY_MAT_H_
23 std::vector<std::vector<int>>
data_;
24 std::map<std::string, size_t>
pos_;
29 auto N =
data_.size();
30 for (
size_t i = 0; i < N; ++i) {
37 bool operator()(
const std::string& row,
const std::string& col)
const {
38 size_t r =
pos_.at(row);
39 size_t c =
pos_.at(col);
44 void set(
const std::string& row,
const std::string& col,
bool b) {
45 size_t r =
pos_.at(row);
46 size_t c =
pos_.at(col);
52 auto N =
data_.size();
59 std::copy(std::begin(
names_), std::end(
names_), std::ostream_iterator<std::string>(os));
65 auto N =
data_.size();
66 for (
size_t c = 0; c < N; ++c) {
71 for (
size_t r = 0; r < N; ++r) {
73 for (
size_t c = 0; c < N; ++c) {
bool operator()(const std::string &row, const std::string &col) const
const std::string & GetHeader(size_t i)
connectivity_mat(const std::vector< std::string > &names)
void set(const std::string &row, const std::string &col, bool b)
void DisplayCondNames(std::ostream &os=std::cout)
std::vector< std::vector< int > > data_
void DisplayMap(std::ostream &os=std::cout)
std::vector< std::string > names_
std::map< std::string, size_t > pos_