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(int node0, int node1, int group, int vdd); 00014 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 00027 void addIslandNodes(int vdd, int node0, int node1); 00028 void createVoltageIslands(); 00029 void printIslands(); 00030 void arrangeGroups(); 00031 int numIslandNodes(); 00032 int numIslandInGroup(int groupID); 00033 int voltageInGroup(int groupID); 00034 int maxIslandNodes(); 00035 int numCurrentGroups; //set to 0 on start and displays number of distinct voltage islands 00036 vector<IslandNodes> islandNodes; 00037 };