Skip to content

Commit

Permalink
#4 preliminary tests
Browse files Browse the repository at this point in the history
added extra array that was needed
  • Loading branch information
MuellMark committed Jul 8, 2023
1 parent 7ab6271 commit 1a2e72e
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Java Code/edgeStorageArrays.java
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,9 @@ public boolean isCirculantLabeling(){
boolean isCir = true;

if(!allEdgesDegree4()) isCir=false;
ArrayList<int[]> cycles = getCycles();
if(isCir){
ArrayList<int[]> cycles = getCycles();
}
//Needs method to get the cycle
//Needs method to check said cycle
return isCir;
Expand All @@ -165,16 +167,18 @@ public ArrayList<int[]> getCycles(){
//Will keep track of possibleNums to avoid repeating
ArrayList<Integer> possibleNums = new ArrayList<>();
for(int i=1;i<size();i++) possibleNums.add(i);
getCyclesRecur(3,possibleNums,cycles);
int[] cycle = new int[size()-1];
cycle[0]=1;

getCyclesRecur(cycle,1,possibleNums,cycles);

return cycles;
}

private void getCyclesRecur(int currentEdge, ArrayList<Integer> possibleNums,
private void getCyclesRecur(int[] cycle,int currentEdge, ArrayList<Integer> possibleNums,
ArrayList<int []> cycles){
if(possibleNums.size()==0){
if(contains(edges[currentEdge][0],1) ||contains(edges[currentEdge][1],1)){
System.out.println("what");
}
}
//Base case, when possiblenums is empty
Expand Down

1 comment on commit 1a2e72e

@MuellMark
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

#35

Please sign in to comment.