@Test public void testGetChildren() { int size = 6; PowerSet emptyPowerSet = new PowerSet(new boolean[size]); Set<PowerSet> prevLevel = new HashSet<PowerSet>(); prevLevel.add(emptyPowerSet); Set<PowerSet> nextLevel = null; for (int k = 1; k<=size;k++) { nextLevel = new HashSet<PowerSet>(); for (PowerSet p:prevLevel) { List<PowerSet> children = p.getChildren(new ArrayList<PowerSet>()); for (PowerSet c:children) { assertTrue(c.isChild(p)); nextLevel.add(c); } } prevLevel = new HashSet<PowerSet>(nextLevel); } }
public List<Assembly> getChildren(List<Assembly> invalidParents) { List<PowerSet> powersetInvalidParents = new ArrayList<PowerSet>(); for (Assembly ia:invalidParents) { powersetInvalidParents.add(ia.engagedSet); } List<PowerSet> powersetChildren = this.engagedSet.getChildren(powersetInvalidParents); List<Assembly> children = new ArrayList<Assembly>(); for (PowerSet c:powersetChildren) { children.add(new Assembly(crystalAssemblies, c)); } return children; }
Assembly { public List<Assembly> getChildren(List<Assembly> invalidParents) { List<PowerSet> powersetInvalidParents = new ArrayList<PowerSet>(); for (Assembly ia:invalidParents) { powersetInvalidParents.add(ia.engagedSet); } List<PowerSet> powersetChildren = this.engagedSet.getChildren(powersetInvalidParents); List<Assembly> children = new ArrayList<Assembly>(); for (PowerSet c:powersetChildren) { children.add(new Assembly(crystalAssemblies, c)); } return children; } }
Assembly { public List<Assembly> getChildren(List<Assembly> invalidParents) { List<PowerSet> powersetInvalidParents = new ArrayList<PowerSet>(); for (Assembly ia:invalidParents) { powersetInvalidParents.add(ia.engagedSet); } List<PowerSet> powersetChildren = this.engagedSet.getChildren(powersetInvalidParents); List<Assembly> children = new ArrayList<Assembly>(); for (PowerSet c:powersetChildren) { children.add(new Assembly(crystalAssemblies, c)); } return children; } Assembly(CrystalAssemblies crystalAssemblies, PowerSet engagedSet); }
Assembly { public List<Assembly> getChildren(List<Assembly> invalidParents) { List<PowerSet> powersetInvalidParents = new ArrayList<PowerSet>(); for (Assembly ia:invalidParents) { powersetInvalidParents.add(ia.engagedSet); } List<PowerSet> powersetChildren = this.engagedSet.getChildren(powersetInvalidParents); List<Assembly> children = new ArrayList<Assembly>(); for (PowerSet c:powersetChildren) { children.add(new Assembly(crystalAssemblies, c)); } return children; } Assembly(CrystalAssemblies crystalAssemblies, PowerSet engagedSet); PowerSet getEngagedSet(); AssemblyGraph getAssemblyGraph(); int getNumEngagedInterfaceClusters(); CrystalAssemblies getCrystalAssemblies(); boolean isChild(List<Assembly> parents); boolean isChild(Assembly potentialParent); List<Assembly> getChildren(List<Assembly> invalidParents); boolean isValid(); boolean isClosedSymmetry(); boolean isIsomorphic(); List<AssemblyDescription> getDescription(); List<ChainVertex> getStructure(); List<List<ChainVertex>> getStructureCentered(); Map<ChainVertex, Matrix4d> getStructurePacked(); static Map<V, Point3i> positionVertices(final UndirectedGraph<V,E> graph); static Map<V, Point3i> positionVertices(final UndirectedGraph<V,E> graph, final List<V> refVertexes, final List<Point3i> refCells); void writeToPdbFile(File file); void writeToMmCifFile(File file); int getId(); void setId(int id); void setCall(CallType call); CallType getCall(); void setCallReason(String callReason); String getCallReason(); double getScore(); double getConfidence(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); void calcScore(); void normalizeScore(double sumProbs); void calcConfidence(); }
Assembly { public List<Assembly> getChildren(List<Assembly> invalidParents) { List<PowerSet> powersetInvalidParents = new ArrayList<PowerSet>(); for (Assembly ia:invalidParents) { powersetInvalidParents.add(ia.engagedSet); } List<PowerSet> powersetChildren = this.engagedSet.getChildren(powersetInvalidParents); List<Assembly> children = new ArrayList<Assembly>(); for (PowerSet c:powersetChildren) { children.add(new Assembly(crystalAssemblies, c)); } return children; } Assembly(CrystalAssemblies crystalAssemblies, PowerSet engagedSet); PowerSet getEngagedSet(); AssemblyGraph getAssemblyGraph(); int getNumEngagedInterfaceClusters(); CrystalAssemblies getCrystalAssemblies(); boolean isChild(List<Assembly> parents); boolean isChild(Assembly potentialParent); List<Assembly> getChildren(List<Assembly> invalidParents); boolean isValid(); boolean isClosedSymmetry(); boolean isIsomorphic(); List<AssemblyDescription> getDescription(); List<ChainVertex> getStructure(); List<List<ChainVertex>> getStructureCentered(); Map<ChainVertex, Matrix4d> getStructurePacked(); static Map<V, Point3i> positionVertices(final UndirectedGraph<V,E> graph); static Map<V, Point3i> positionVertices(final UndirectedGraph<V,E> graph, final List<V> refVertexes, final List<Point3i> refCells); void writeToPdbFile(File file); void writeToMmCifFile(File file); int getId(); void setId(int id); void setCall(CallType call); CallType getCall(); void setCallReason(String callReason); String getCallReason(); double getScore(); double getConfidence(); @Override boolean equals(Object other); @Override int hashCode(); @Override String toString(); void calcScore(); void normalizeScore(double sumProbs); void calcConfidence();  }