本文整理汇总了Java中org.gephi.layout.plugin.force.StepDisplacement类的典型用法代码示例。如果您正苦于以下问题:Java StepDisplacement类的具体用法?Java StepDisplacement怎么用?Java StepDisplacement使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
StepDisplacement类属于org.gephi.layout.plugin.force包,在下文中一共展示了StepDisplacement类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: YifanHuLayout_Step_Limited
import org.gephi.layout.plugin.force.StepDisplacement; //导入依赖的package包/类
public static IGraph YifanHuLayout_Step_Limited(final IGraph g, final double optimal_distance,
final double initial_step, final double step_ratio, final double convergence_threshold,
final double barnes_hut_theta, final double max_x, final double max_y) {
initializing();
// System.out.println("Yifan Hu algorithm (by step and bounds limited),
// starting.");
// System.out.println("converting ...");
IGraph_to_GraphModel(g);
// System.out.println("initialising ...");
initializing_GraphModel(g);
final YifanHuLayout layout = new YifanHuLayout(null, new StepDisplacement(1f));
InitializingYifanHuLayout(layout, optimal_distance, initial_step, step_ratio, convergence_threshold,
barnes_hut_theta);
layout.goAlgo();
Update_locations(g, max_x, max_y);
// System.out.println("ended.");
return g;
}
开发者ID:gama-platform,项目名称:gama,代码行数:19,代码来源:GraphYiFanHuLayoutStatement.java
示例2: YifanHuLayout_Step_Unlimited
import org.gephi.layout.plugin.force.StepDisplacement; //导入依赖的package包/类
public static IGraph YifanHuLayout_Step_Unlimited(final IGraph g, final double optimal_distance,
final double initial_step, final double step_ratio, final double convergence_threshold,
final double barnes_hut_theta) {
initializing();
// System.out.println("Yifan Hu algorithm (by step), starting.");
// System.out.println("converting ...");
IGraph_to_GraphModel(g);
// System.out.println("initialising ...");
initializing_GraphModel(g);
final YifanHuLayout layout = new YifanHuLayout(null, new StepDisplacement(1f));
InitializingYifanHuLayout(layout, optimal_distance, initial_step, step_ratio, convergence_threshold,
barnes_hut_theta);
layout.goAlgo();
Update_locations(g);
// System.out.println("ended.");
return g;
}
开发者ID:gama-platform,项目名称:gama,代码行数:18,代码来源:GraphYiFanHuLayoutStatement.java
示例3: YifanHuLayout_Full_Limited
import org.gephi.layout.plugin.force.StepDisplacement; //导入依赖的package包/类
public static IGraph YifanHuLayout_Full_Limited(final IGraph g, final double optimal_distance,
final double initial_step, final double step_ratio, final double convergence_threshold,
final double barnes_hut_theta, final int max_step, final boolean initialise, final double max_x,
final double max_y) {
initializing();
// System.out.println("Yifan Hu algorithm (bounds limited), starting.");
// System.out.println("converting ...");
IGraph_to_GraphModel(g);
initializing_GraphModel(g);
// System.out.println("graphmodel constructed : " +
// graph_model.getUndirectedGraph().getNodeCount() + " nodes & "+
// graph_model.getUndirectedGraph().getEdgeCount() + " edges.");
final YifanHuLayout layout = new YifanHuLayout(null, new StepDisplacement(1f));
// System.out.println("initialising layout ...");
InitializingYifanHuLayout(layout, optimal_distance, initial_step, step_ratio, convergence_threshold,
barnes_hut_theta);
// System.out.println("initialising algorithm ...");
if (initialise) {
layout.initAlgo();
} else {
// initializing_GraphModel(g);
}
// System.out.println("working ...");
for (int i = 0; i < max_step && layout.canAlgo(); i++) {
layout.goAlgo();
}
layout.endAlgo();
Update_locations(g, max_x, max_y);
// System.out.println("ended.");
return g;
}
开发者ID:gama-platform,项目名称:gama,代码行数:32,代码来源:GraphYiFanHuLayoutStatement.java
示例4: YifanHuLayout_Full_Unlimited
import org.gephi.layout.plugin.force.StepDisplacement; //导入依赖的package包/类
public static IGraph YifanHuLayout_Full_Unlimited(final IGraph g, final double optimal_distance,
final double initial_step, final double step_ratio, final double convergence_threshold,
final double barnes_hut_theta, final int max_step, final boolean initialise) {
initializing();
// System.out.println("Yifan Hu algorithm starting.");
// System.out.println("converting ...");
IGraph_to_GraphModel(g);
initializing_GraphModel(g);
// System.out.println("graphmodel constructed : " +
// graph_model.getUndirectedGraph().getNodeCount() + " nodes & "+
// graph_model.getUndirectedGraph().getEdgeCount() + " edges.");
final YifanHuLayout layout = new YifanHuLayout(null, new StepDisplacement(1f));
// System.out.println("initialising layout ...");
InitializingYifanHuLayout(layout, optimal_distance, initial_step, step_ratio, convergence_threshold,
barnes_hut_theta);
// System.out.println("initialising algorithm ...");
if (initialise) {
layout.initAlgo();
} else {
// initializing_GraphModel(g);
}
// System.out.println("working ...");
for (int i = 0; i < max_step && layout.canAlgo(); i++) {
layout.goAlgo();
// System.out.println("..." + i + "/" + max_step + "/" +
// layout.canAlgo());
}
// System.out.println("... " + layout.canAlgo());
layout.endAlgo();
Update_locations(g);
// System.out.println("ended.");
return g;
}
开发者ID:gama-platform,项目名称:gama,代码行数:34,代码来源:GraphYiFanHuLayoutStatement.java
示例5: applyLayout
import org.gephi.layout.plugin.force.StepDisplacement; //导入依赖的package包/类
public void applyLayout() {
YifanHuLayout layout = new YifanHuLayout(null, new StepDisplacement(1f));
layout.setGraphModel(graphModel);
layout.initAlgo();
layout.resetPropertiesValues();
layout.setOptimalDistance(200f);
for (int i = 0; i < 100 && layout.canAlgo(); i++) {
layout.goAlgo();
}
layout.endAlgo();
}
开发者ID:learning-layers,项目名称:Expert-Identification-Service,代码行数:13,代码来源:GraphMl2GEXFConverter.java
示例6: privateExecuteIn
import org.gephi.layout.plugin.force.StepDisplacement; //导入依赖的package包/类
@Override
protected Object privateExecuteIn(final IScope scope) throws GamaRuntimeException {
// IGraph data = createData(scope);
final IGraph g = Cast.asGraph(scope, getFacetValue(scope, IKeyword.GRAPH));
final double optimal_distance = Cast.asFloat(scope,
getFacetValue(scope, GraphYiFanHuLayoutStatement.OPTIMAL_DIST, OPTIMAL_DIST_DEFAULT));
final double initial_step = Cast.asFloat(scope,
getFacetValue(scope, GraphYiFanHuLayoutStatement.STEP_SIZE, INITIAL_STEP_DEFAULT));
final int nb_steps = Cast.asInt(scope,
getFacetValue(scope, GraphYiFanHuLayoutStatement.NB_STEPS, NB_STEPS_DEFAULT));
final double barnes_hut_theta = Cast.asFloat(scope,
getFacetValue(scope, GraphYiFanHuLayoutStatement.BARNES_THETA, BARNES_THETA_DEFAULT));
final int max_level = Cast.asInt(scope,
getFacetValue(scope, GraphYiFanHuLayoutStatement.QUAD_MAX, QUAD_MAX_DEFAULT));
final double relative_strength = Cast.asFloat(scope,
getFacetValue(scope, GraphYiFanHuLayoutStatement.RELATIVE_STRENGTH, RATIO_DEFAULT));
final Object bp1 = getFacetValue(scope, GraphYiFanHuLayoutStatement.BOUNDED_P1, null);
final Object bp2 = getFacetValue(scope, GraphYiFanHuLayoutStatement.BOUNDED_P2, null);
// public static IGraph YifanHuLayout_Step_Unlimited(final IGraph g,
// double optimal_distance, double initial_step, double step_ratio,
// double convergence_threshold, double barnes_hut_theta) {
initializing();
// System.out.println("Yifan Hu algorithm (by step), starting.");
// System.out.println("converting ...");
IGraph_to_GraphModel(g);
// System.out.println("initialising ...");
initializing_GraphModel(g);
final YifanHuLayout layout = new YifanHuLayout(null, new StepDisplacement(1f));
InitializingYifanHuLayout(layout, optimal_distance, initial_step, STEP_RATIO_DEFAULT,
CONVERGENCE_THRESHOLD_DEFAULT, barnes_hut_theta, max_level, relative_strength);
// layout.goAlgo();
// for ( int i = 0; i < nb_steps && layout.canAlgo(); i++ ) {
for (int i = 0; i < nb_steps; i++) {
layout.goAlgo();
// System.out.println("..." + i + "/" + nb_steps + "/" +
// layout.canAlgo());
}
if (bp1 != null && bp2 != null) {
final ILocation p1 = Cast.asPoint(scope, bp1);
final ILocation p2 = Cast.asPoint(scope, bp2);
Update_locations(g, FastMath.min(p1.getX(), p2.getX()), FastMath.min(p1.getY(), p2.getY()),
Math.max(p1.getX(), p2.getX()), FastMath.max(p1.getY(), p2.getY()));
} else {
Update_locations(g);
}
// System.out.println("ended.");
// return g;
// }
return g;
}
开发者ID:gama-platform,项目名称:gama,代码行数:53,代码来源:GraphYiFanHuLayoutStatement.java
注:本文中的org.gephi.layout.plugin.force.StepDisplacement类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论