graph::print
Create function to print a graph
This commit is contained in:
		@@ -21,3 +21,9 @@ graph::graph (const int processes, const int resources) {
 | 
			
		||||
      }
 | 
			
		||||
   }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void graph::print () {
 | 
			
		||||
   printf("np: %d\tnr: %d\n", num_processes, num_resources);
 | 
			
		||||
   printf("resource_counts:\n"); for (auto e: resource_counts) printf("%d\t", e); printf("\n");
 | 
			
		||||
   printf("matrix:\n"); for (auto x: matrix.data) {for (auto y: x) printf("%d\t", y); printf("\n");}
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user