本文整理汇总了Java中org.fleen.util.tree.TreeNodeIterator类的典型用法代码示例。如果您正苦于以下问题:Java TreeNodeIterator类的具体用法?Java TreeNodeIterator怎么用?Java TreeNodeIterator使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
TreeNodeIterator类属于org.fleen.util.tree包,在下文中一共展示了TreeNodeIterator类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: createNodes
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
protected boolean createNodes(ForsythiaComposition composition){
Jig jig;
boolean creatednodes=false;
TreeNodeIterator i=composition.getLeafPolygonIterator();
FPolygon leaf;
ForsythiaGrammar grammar=composition.getGrammar();
while(i.hasNext()){
leaf=(FPolygon)i.next();
if(isCapped(leaf))continue;
jig=selectJig(grammar,leaf);
if(jig==null){
cap(leaf);
}else{
jig.createNodes(leaf);
creatednodes=true;}}
jigbypolygonsig.clear();
return creatednodes;}
示例2: createNodes
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
private boolean createNodes(ForsythiaComposition composition){
Jig jig;
boolean creatednodes=false;
TreeNodeIterator i=composition.getLeafPolygonIterator();
FPolygon leaf;
ForsythiaGrammar grammar=composition.getGrammar();
while(i.hasNext()){
leaf=(FPolygon)i.next();
if(isCapped(leaf))continue;
jig=selectJig(grammar,leaf);
if(jig==null){
cap(leaf);
}else{
jig.createNodes(leaf);
creatednodes=true;}}
jigbypolygonsig.clear();
return creatednodes;}
示例3: createNodes
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
protected boolean createNodes(ForsythiaComposition composition){
Jig jig;
FPolygon leaf;
boolean creatednodes=false;
TreeNodeIterator i;
//random cap at level
if(buildcycleindex==6){
i=composition.getLeafPolygonIterator();
while(i.hasNext()){
leaf=(FPolygon)i.next();
if(rnd.nextDouble()<0.3)
cap(leaf);}}
//actual create nodes thing
ForsythiaGrammar grammar=composition.getGrammar();
i=composition.getLeafPolygonIterator();
while(i.hasNext()){
leaf=(FPolygon)i.next();
if(isCapped(leaf))continue;
jig=selectJig(grammar,leaf);
if(jig==null){
cap(leaf);
}else{
jig.createNodes(leaf);
creatednodes=true;}}
jigbypolygonsig.clear();
return creatednodes;}
示例4: getLeafPolygonIterator
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
/**
* @return Leaves of the branch rooted at this node
*/
@SuppressWarnings("serial")
public TreeNodeIterator getLeafPolygonIterator(){
return new TreeNodeIterator(this){
//if it isn't a leaf AND a polygon then skip it
public boolean skip(TreeNode node){
return !((node instanceof FPolygon)&&(node.isLeaf()));}};}
示例5: getTreeString
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public String getTreeString(){
StringBuffer a=new StringBuffer();
TreeNodeIterator i=new TreeNodeIterator(this);
ConnectedGraph cg;
while(i.hasNext()){
cg=(ConnectedGraph)i.next();
a.append(cg+"\n");}
a.append("\n");
return a.toString();}
示例6: getYardsForCGTreeRoot
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
private List<KYard> getYardsForCGTreeRoot(ConnectedGraph root){
List<KYard> yards=new ArrayList<KYard>();
TreeNodeIterator i=new TreeNodeIterator(root);
ConnectedGraph cg;
while(i.hasNext()){
cg=(ConnectedGraph)i.next();
yards.addAll(getYardsForCG(cg));}
return yards;}
示例7: getHeads
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public List<ZPolygon> getHeads(){
List<ZPolygon> heads=new ArrayList<ZPolygon>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
lattice=(ZLattice)i.next();
heads.addAll(lattice.getHeads());}
return heads;}
示例8: getPoints
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public Set<ZPoint> getPoints(){
Set<ZPoint> points=new HashSet<ZPoint>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
lattice=(ZLattice)i.next();
points.addAll(lattice.getPoints());}
return points;}
示例9: getPrimaryPoints
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public Set<ZPoint> getPrimaryPoints(){
Set<ZPoint> points=new HashSet<ZPoint>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
lattice=(ZLattice)i.next();
points.addAll(lattice.getSoul().getPrimaryPoints());}
return points;}
示例10: getSegs
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public Set<ZSeg> getSegs(){
Set<ZSeg> segs=new HashSet<ZSeg>();
TreeNodeIterator i=getLatticeIterator();
ZLattice lattice;
while(i.hasNext()){
lattice=(ZLattice)i.next();
segs.addAll(lattice.getSegs());}
return segs;}
示例11: getNodeIterator
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public TreeNodeIterator getNodeIterator(){
return new TreeNodeIterator(root);}
示例12: getNodes
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public List<ForsythiaTreeNode> getNodes(){
List<ForsythiaTreeNode> nodes=new ArrayList<ForsythiaTreeNode>();
TreeNodeIterator i=getNodeIterator();
while(i.hasNext())
nodes.add((ForsythiaTreeNode)i.next());
return nodes;}
示例13: getGridIterator
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public TreeNodeIterator getGridIterator(){
return new GridNodeIterator(root);}
示例14: getPolygonIterator
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public TreeNodeIterator getPolygonIterator(){
return new PolygonIterator(root);}
示例15: getPolygons
import org.fleen.util.tree.TreeNodeIterator; //导入依赖的package包/类
public List<FPolygon> getPolygons(){
List<FPolygon> polygons=new ArrayList<FPolygon>();
TreeNodeIterator i=getPolygonIterator();
while(i.hasNext())
polygons.add((FPolygon)i.next());
return polygons;}