00001 #include <fstream> 00002 #include <vector> 00003 #include <algorithm> 00004 #include <cmath> 00005 #include <cstdlib> 00006 00007 using namespace std; 00008 00009 class IslandNodes 00010 { 00011 public: 00012 IslandNodes(); 00013 ~IslandNodes(); 00014 IslandNodes(int node0, int node1, int group, int vdd); 00015 int voltage; 00016 int groupID; 00017 void setGroupID(int group); 00018 vector<int> nodes; 00019 00020 }; 00021 00022 class SetOfVoltages 00023 { 00024 public: 00025 SetOfVoltages(); 00026 ~SetOfVoltages(); 00027 00028 void addIslandNodes(int vdd, int node0, int node1); 00029 void createVoltageIslands(); 00030 void printIslands(); 00031 void arrangeGroups(); 00032 int numIslandNodes(); 00033 int numIslandInGroup(int groupID); 00034 int voltageInGroup(int groupID); 00035 int maxIslandNodes(); 00036 int numCurrentGroups; //set to 0 on start and displays number of distinct voltage islands 00037 vector<IslandNodes> islandNodes; 00038 };