src/CVXcanon.cpp
void add_matrix_to_vectors(Matrix &block, std::vector<double> &V,
                           std::vector<int>  &I, std::vector<int> &J,
                           int &vert_offset, int &horiz_offset){
	for ( int k = 0; k < block.outerSize(); ++k ) {
		for ( Matrix::InnerIterator it(block, k); it; ++it ){
			V.push_back(it.value());

			/* Push back current row and column indices */
			I.push_back(it.row() + vert_offset);   	
			J.push_back(it.col() + horiz_offset);
		}
	}
}
/* function: add_matrix_to_vectors
*
* This function adds a matrix to our sparse matrix triplet
* representation, by using eigen's sparse matrix iterator
* This function takes horizontal and vertical offset, which indicate
* the offset of this block within our larger matrix.
*/
add_matrix_to_vectors
This function adds a matrix to our sparse matrix triplet
representation, by using eigen's sparse matrix iterator
This function takes horizontal and vertical offset, which indicate
the offset of this block within our larger matrix.
add_matrix_to_vectors This function adds a matrix to our sparse matrix triplet representation by using eigen ' s sparse matrix iterator This function takes horizontal and vertical offset which indicate the offset of this block within our larger matrix .
void add_matrix_to_vectors(Matrix &block, std::vector<double> &V,
                           std::vector<int>  &I, std::vector<int> &J,
                           int &vert_offset, int &horiz_offset){
	for ( int k = 0; k < block.outerSize(); ++k ) {
		for ( Matrix::InnerIterator it(block, k); it; ++it ){
			V.push_back(it.value());
			I.push_back(it.row() + vert_offset);   	
			J.push_back(it.col() + horiz_offset);
		}
	}
}
void add_matrix_to_vectors ( Matrix & block , std :: vector < double > & V , std :: vector < int > & I , std :: vector < int > & J , int & vert_offset , int & horiz_offset ) { for ( int k = 0 ; k < block . outerSize ( ) ; ++ k ) { for ( Matrix :: InnerIterator it ( block , k ) ; it ; ++ it ) { V . push_back ( it . value ( ) ) ; I . push_back ( it . row ( ) + vert_offset ) ; J . push_back ( it . col ( ) + horiz_offset ) ; } } }
function: add_matrix_to_vectors
This function adds a matrix to our sparse matrix triplet
representation, by using eigen's sparse matrix iterator
This function takes horizontal and vertical offset, which indicate
the offset of this block within our larger matrix.
function : add_matrix_to_vectors This function adds a matrix to our sparse matrix triplet representation by using eigen ' s sparse matrix iterator This function takes horizontal and vertical offset which indicate the offset of this block within our larger matrix .
/* Push back current row and column indices */