project1/app/proj1.cpp
//I need to handle 0s that are not located at diagonal line of the matrix
I need to handle 0s that are not located at diagonal line of the matrix
I need to handle 0s that are not located at diagonal line of the matrix
std::vector<std::vector<long>> processing_Graph(const std::vector<std::vector<long>> & graph,unsigned n){
    std::vector<std::vector<long>> graph_processed=graph;
    for (unsigned i=0;i<n;i++){
        for (unsigned j=0;j<n;j++){
            if ((i!=j)&&(graph_processed[i][j]==0)){
                graph_processed[i][j]=INF;
            }
        }
    }
    return graph_processed;
}
std :: vector < std :: vector < long > > processing_Graph ( const std :: vector < std :: vector < long > > & graph , unsigned n ) { std :: vector < std :: vector < long > > graph_processed = graph ; for ( unsigned i = 0 ; i < n ; i ++ ) { for ( unsigned j = 0 ; j < n ; j ++ ) { if ( ( i != j ) && ( graph_processed [ i ] [ j ] == 0 ) ) { graph_processed [ i ] [ j ] = INF ; } } } return graph_processed ; }
I need to handle 0s that are not located at diagonal line of the matrix
I need to handle 0s that are not located at diagonal line of the matrix