Merge pull request #269 from broadinstitute/rp_minor_pruning_function_name
Minor changes to docs in the graph pruning.
This commit is contained in:
commit
210007cd09
|
|
@ -80,7 +80,7 @@ public class LowWeightChainPruner<V extends BaseVertex, E extends BaseEdge> {
|
||||||
final Set<E> edgesToKeep = new LinkedHashSet<>();
|
final Set<E> edgesToKeep = new LinkedHashSet<>();
|
||||||
|
|
||||||
for ( final Path<V,E> linearChain : getLinearChains(graph) ) {
|
for ( final Path<V,E> linearChain : getLinearChains(graph) ) {
|
||||||
if( mustBeKeep(linearChain, pruneFactor) ) {
|
if( mustBeKept(linearChain, pruneFactor) ) {
|
||||||
// we must keep edges in any path that contains a reference edge or an edge with weight > pruneFactor
|
// we must keep edges in any path that contains a reference edge or an edge with weight > pruneFactor
|
||||||
edgesToKeep.addAll(linearChain.getEdges());
|
edgesToKeep.addAll(linearChain.getEdges());
|
||||||
}
|
}
|
||||||
|
|
@ -96,10 +96,14 @@ public class LowWeightChainPruner<V extends BaseVertex, E extends BaseEdge> {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get the maximum pruning multiplicity seen on any edge in this graph
|
* Traverse the edges in the path and determine if any are either ref edges or have weight above
|
||||||
* @return an integer > 0
|
* the pruning factor and should therefore not be pruned away.
|
||||||
|
*
|
||||||
|
* @param path the path in question
|
||||||
|
* @param pruneFactor the integer pruning factor
|
||||||
|
* @return true if any edge in the path must be kept
|
||||||
*/
|
*/
|
||||||
private boolean mustBeKeep(final Path<V,E> path, final int pruneFactor) {
|
private boolean mustBeKept(final Path<V, E> path, final int pruneFactor) {
|
||||||
for ( final E edge : path.getEdges() ) {
|
for ( final E edge : path.getEdges() ) {
|
||||||
if ( edge.getPruningMultiplicity() >= pruneFactor || edge.isRef() )
|
if ( edge.getPruningMultiplicity() >= pruneFactor || edge.isRef() )
|
||||||
return true;
|
return true;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue