Skip to content

A collection of algorithms for calculating the chromatic number of undirected graphs, including Brute Force, Greedy, DSatur, Backtracking, RLF, 3-SAT, and DFS.

Notifications You must be signed in to change notification settings

chiarapaglioni/GraphColouring

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GROUP30_2020

To run the the program from the terminal, navigate to the folder GROUP30_2020 and run the following commands:

javac ./graphy/Game.java
java graphy/Game

Commenting & readability:

Ensure every method has a comment using JavaDoc commenting

/** method to doStuff
 *@param foo - int - the number of foos
 *@return bar - int - the bar level
 */
 private int doStuff(int foo)
 {
 	return bar;
 }

Ensure that complex code pieces such as nested for loops are explained

//This loops through all numbers and calls {@code: doStuff()} on each
for(int i: numbers)
{
  doStuff(i);
}

Add extra line comments for further explanation, either above or to the side (lined up), don't be afraid of using spaces

Between the two examples below, what is more readable?        
        
    
L[Lpntr] = new String[2];		// Create two more elements
L_values[Lpntr] = new Boolean[2];
    				
L[Lpntr][0] = i + colours[j] + "n";	// Add clause (Vi + Kj + n ^ Vi + Kl + n) 
L[Lpntr][1] = i + colours[l] + "n";

L_values[Lpntr][0] = null;		// Add two new corresponding values to the L_Values 
L_values[Lpntr][1] = null;
     
Lpntr++;				// Increment to the next pointer location

or:
          
L[Lpntr] = new String[2]; // Create two more elements
L_values[Lpntr] = new Boolean[2];
L[Lpntr][0] = i + colours[j] + "n";// Add clause (Vi + Kj + n ^ Vi + Kl + n) 
L[Lpntr][1] = i + colours[l] + "n";
L_values[Lpntr][0] = null;// Add two new corresponding values to the L_Values 
L_values[Lpntr][1] = null;
Lpntr++;// Increment to the next pointer location

About

A collection of algorithms for calculating the chromatic number of undirected graphs, including Brute Force, Greedy, DSatur, Backtracking, RLF, 3-SAT, and DFS.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 5

Languages