overview
cbaUtils library is implemented as shared object in C++ with std=c17
the library contains reusable utility components for populations of structures from files and RDBMS.
objects in cbaUtils library are declared in the namespace cbaWorkflowUtils.
the library file is libcbaUtils.so
namespace cbaWorkflowUtils
{
}
reading config file into the map of variables
matrix class
class matrix
{
public:
matrix(int rows,int columns,vector<vector<int>> v):m_rows(rows),m_columns(columns),m_matrix(v){};
matrix& operator=(const matrix& m);
vector<int>& operator[](int i);
matrix* multiply(matrix&);
int getColumns() { return m_columns;}
int getRows() { return m_rows;}
void print();
void printFirst();
private:
vector<vector<int>> m_matrix;
int m_rows;
int m_columns;
};
vector<vector<int> v should be initialized prior to passing to the matrix constructor:
int rows1=8;
int columns1=8;
std::vector<std::vector<int>> m_m1(rows1, std::vector<int>(columns1));
matrix m1(rows1,columns1,m_m1);
method multiply is performing dot product . throws exception if the current matrix columns number does not match parameter matrix rows number
[ ] operator is throwing exception if the index is out of bounds.
utils class
utils::utils()
utils::utils(string connectionString) creates the utils structrures from the PostrgreSQL repository
create adjacency matrix
matrix* utils::generateAdjacencyMatrix()
generate execution levels
int utils::generateStartLevels(vector<vector<int>>& start_levels)