Ejemplo n.º 1
0
 /*	public void fixAtomsOfBond(){ // do fix bonds of Atom first
 	ArrayList<Atom> temp = new ArrayList<Atom>(atomList.size());
 	ArrayList<Bond> temp2 = new ArrayList<Bond>(bondList.size());
 	for(int i = 0; i < temp2.size(); i++){ // iterates bondList
 		for(int j = 0; j < atomList.size(); j++){//iterates atomlist
 			temp2 = atomList.get(j).getAdjacentBonds();
 			for(int k = 0; k < temp2.size(); k++){ //iterates bonds on atomList
 				if(temp2.get(k).getEdgeNum() == bondList.get(k).getEdgeNum()){
 					temp.set(k, bondList.get(j));
 				}
 			}
 			bondList.get(i).setAdjacentAtoms(temp);
 		}
 	}
 } */
 public String toString() {
   String temp = " ";
   if (atomList == null) {
     return "Null found for atomList";
   }
   for (Atom a : atomList) {
     temp = temp.concat(a.toString()) + "\n";
   }
   if (bondList == null) {
     return "Null found for bondList";
   }
   if (bondList.isEmpty()) {
     temp += " bondList is empty";
     // return "bondList is empty";
   }
   for (Bond b : bondList) {
     temp = temp.concat(b.toString()) + "\n";
   }
   return temp;
 }
Ejemplo n.º 2
0
 @Override
 public void setValue(Atom a, Atom v) {
   m_phi.setValue(a, v);
   m_variableResolver.put(a.toString(), v.toString());
 }