本文整理汇总了Java中vnreal.network.substrate.SubstrateNetwork.getCopy方法的典型用法代码示例。如果您正苦于以下问题:Java SubstrateNetwork.getCopy方法的具体用法?Java SubstrateNetwork.getCopy怎么用?Java SubstrateNetwork.getCopy使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vnreal.network.substrate.SubstrateNetwork
的用法示例。
在下文中一共展示了SubstrateNetwork.getCopy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: get_g_res
import vnreal.network.substrate.SubstrateNetwork; //导入方法依赖的package包/类
SubstrateNetwork get_g_res(SubstrateNetwork g_P, SubstrateNode sn) {
SubstrateNetwork g_res = g_P.getCopy(false, false);
boolean removed = g_res.removeVertex(sn);
assert (removed);
return g_res;
}
示例2: getPartitionsTree
import vnreal.network.substrate.SubstrateNetwork; //导入方法依赖的package包/类
/**
* Creates the rootNode of the LockTree
*
* @param cluster SubstrateNetwork
* @return Locktree with the Clusterheads
*/
public LockTree getPartitionsTree(SubstrateNetwork cluster) {
// if (cache.get(cluster) != null) {
// return cache.get(cluster);
// }
SubstrateNetwork newCluster = cluster.getCopy(false, true);
// newCluster.generateDuplicateEdges();
SubstrateNode clusterhead = Utils.findClusterhead(newCluster);
Collection<ClusterHead> delegationNodes = new LinkedList<ClusterHead>();
ClusterHead newClusterHead = null;
if (fullKnowledgeNodesLevel <= 0) {
newClusterHead = new FullKnowledgeClusterHead(
newCluster,
false,
0,
(delegationNodesLevel == 0),
clusterhead,
delegationNodes,
embeddingAlgorithmFactory.createInstance(),
estimationAlgorithm);
// } else {
// newClusterHead = new PartialKnowledgeClusterHead(
// cluster,
// (delegationNodesLevel == 0),
// 0,
// clusterhead,
// delegationNodes,
// estimationAlgorithm,
// partitioningAlgorithm,
// partialLinkmappingAlgorithm,
// embeddingAlgorithmFactory.createInstance(),
// null);
}
LockTree root = new LockTree("p" + pCounter++, null, newClusterHead);
if (delegationNodesLevel == 0) {
delegationNodes.add(newClusterHead);
}
int d = 0;
if (maxLevel != 0)
d = getPartitionsTree(root, 1, delegationNodes, newCluster, 0);
root.setDepth(d);
cloneSubLockTrees(root);
// cache.put(cluster, root);
// removeDuplicateEdges(root, cluster.getEdges());
return root;
}