mirror of
https://github.com/bancika/diy-layout-creator
synced 2026-11-11 01:32:08 +10:00
reorganize netlist code, comment out unused functions
This commit is contained in:
Binary file not shown.
@@ -22,7 +22,6 @@
|
||||
package org.diylc.netlist;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collections;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
@@ -84,27 +83,13 @@ public class GuitarDiagramAnalyzer extends NetlistAnalyzer implements INetlistAn
|
||||
public String getFontName() {
|
||||
return new JLabel().getFont().getName();
|
||||
}
|
||||
|
||||
public List<Summary> summarize(List<Netlist> netlists, Node preferredOutput) throws TreeException {
|
||||
Map<String, Summary> summaries = new HashMap<String, Summary>();
|
||||
for (Netlist n : netlists) {
|
||||
Summary s = summarize(n, preferredOutput);
|
||||
if (summaries.containsKey(s.getSummary()))
|
||||
summaries.get(s.getSummary()).append(n);
|
||||
else
|
||||
summaries.put(s.getSummary(), s);
|
||||
}
|
||||
|
||||
List<Summary> res = new ArrayList<Summary>(summaries.values());
|
||||
Collections.sort(res);
|
||||
return res;
|
||||
}
|
||||
|
||||
|
||||
private int positiveCount;
|
||||
private int negativeCount;
|
||||
private int noiseCount;
|
||||
|
||||
private Summary summarize(Netlist netlist, Node preferredOutput) throws TreeException {
|
||||
protected Summary summarize(Netlist netlist, Node preferredOutput) throws TreeException {
|
||||
List<String> notes = new ArrayList<String>();
|
||||
|
||||
Tree tree = constructTree(netlist);
|
||||
|
||||
@@ -48,17 +48,8 @@ public class SpiceAnalyzer extends NetlistAnalyzer implements INetlistAnalyzer {
|
||||
public String getFontName() {
|
||||
return "Courier New";
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Summary> summarize(List<Netlist> netlists, Node preferredOutput) throws TreeException {
|
||||
List<Summary> summaries = new ArrayList<Summary>();
|
||||
for (Netlist n : netlists)
|
||||
summaries.add(summarize(n, preferredOutput));
|
||||
|
||||
return summaries;
|
||||
}
|
||||
|
||||
private Summary summarize(Netlist netlist, Node preferredOutput) throws TreeException {
|
||||
protected Summary summarize(Netlist netlist, Node preferredOutput) throws TreeException {
|
||||
// grab all components that are in the netlist
|
||||
List<IDIYComponent<?>> allComponents = new ArrayList<IDIYComponent<?>>(extractComponents(netlist));
|
||||
Collections.sort(allComponents, new Comparator<IDIYComponent<?>>() {
|
||||
|
||||
Reference in New Issue
Block a user