-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A large commit that cannot be described in one sentence except by say…
…ing we were using telegram most of the time to collaborate on code.
- Loading branch information
1 parent
dfcebca
commit 2b9e213
Showing
32 changed files
with
774 additions
and
844 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,3 @@ | ||
bin/ | ||
bin/ | ||
old/ | ||
images/ |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,3 @@ | ||
build: | ||
-mkdir bin | ||
javac -cp ".:./lib/ejml.jar" src/*.java -d bin/ | ||
run: | ||
java -cp ".:./lib/ejml.jar" bin/Main | ||
javac -cp ".:./lib/ejml.jar:./lib/jchart2d.jar" src/*.java -d bin/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
#!/bin/bash | ||
cd bin | ||
java -cp ".:../lib/ejml.jar" Main | ||
java -cp "../lib/ejml.jar:../lib/jchart2d-3.2.2.jar" Main |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import java.util.Vector; | ||
|
||
public class CircularArray <T>{ | ||
Vector<T> ints = new Vector<>(); | ||
void setVector(Vector<T> ints){ | ||
this.ints = ints; | ||
} | ||
Vector<T> getVector(int begin , int size){ | ||
Vector<T> result = new Vector<>(); | ||
for(int i=begin ; i< ints.size() ;i++){ | ||
result.add(ints.get(i)); | ||
} | ||
for(int i=0 ; i<begin ; i++){ | ||
result.add(ints.get(i)); | ||
} | ||
return Utils.shortenVector(result , size); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
public class ComponentFactory { | ||
public static Component construct(String name , Point[] targetNodes , Double args[]) throws Exception { | ||
if(Constants.R.compareTo(name) == 0){ | ||
return new Resistance(targetNodes, args); | ||
}else if(Constants.DC_V.compareTo(name) == 0){ | ||
return new DC_V(targetNodes, args); | ||
}else if(Constants.DC_I.compareTo(name) == 0){ | ||
return new DC_I(targetNodes, args); | ||
}else if(Constants.AC_V.compareTo(name) == 0){ | ||
return new AC_V(targetNodes, args); | ||
}else if(Constants.AC_I.compareTo(name) == 0){ | ||
return new AC_I(targetNodes, args); | ||
}else if(Constants.C.compareTo(name) == 0){ | ||
return new Capacitor(targetNodes, args); | ||
}else if(Constants.D.compareTo(name) == 0){ | ||
return new Diode(targetNodes , args); | ||
}else if(Constants.W.compareTo(name) == 0){ | ||
return new DC_V(targetNodes, new Double[]{0.0}); | ||
}else{ | ||
throw new Exception("Unknown Component\n"); | ||
} | ||
} | ||
} |
Oops, something went wrong.