try {
std::vector<double> v1 {1, 2, 3, 4, 5}, v2 {2, 3, 4}, v3 {3, 4, 5, 6};
std::cout << std::endl << " std::vector v1: " << std::endl;
std::cout << std::endl << " std::vector v2: " << std::endl;
std::cout << std::endl << " std::vector v3: " << std::endl;
std::vector<int> lines0 {0, 3, 1};
std::cout << std::endl << " std::vector v1 without the lines 0, 1, 3: " << std::endl;
std::vector<std::vector<double>> Mat {v1, v2, v3};
std::cout << std::endl << " matrix Mat: " << std::endl;
std::vector<int> lines {2, 0};
std::cout << std::endl << " matrix Mat without the lines 0 and 2: " << std::endl;
std::vector<int> columns {0, 1};
std::cout << std::endl << " matrix Mat without the columns 0 and 1: " << std::endl;
}
return 0;
}
Useful generic functions.
int main()
main function to create the logo of the CosmoBolognaLib
const char * what() const noexcept override
the error description
void Print(const T value, const int prec, const int ww, const std::string header="", const std::string end="\n", const bool use_coutCBL=true, std::ostream &stream=std::cout, const std::string colour=cbl::par::col_default)
function to print values with a proper homegenised format
void Erase_lines(std::vector< std::vector< T > > &Mat, std::vector< int > ll)
erase some lines of a matrix
void Erase_columns(std::vector< std::vector< T > > &Mat, std::vector< int > col)
erase some columns of a matrix
void Erase(std::vector< T > &vv, std::vector< int > ind)
erase some elements of a std::vector