Search in sources :

Example 1 with EnergyFunction

use of org.vcell.util.graphlayout.energybased.EnergySum.EnergyFunction in project vcell by virtualcell.

the class ShootAndCutLayouter method createTermFactories.

public static Set<EnergyTerm.Factory> createTermFactories() {
    EnergyFunction nodesRepulsion = new NailShapeEnergyFunction(REPULSION_RANGE, REPULSION_STRENGTH);
    EnergyFunction edgesPull = new ParabularEnergyFunction(EDGE_SPRING_STRENGTH);
    EnergyTerm.Factory nodesRepulsionFactory = new AllNodePairsEnergyTermFactory(nodesRepulsion, REPULSION_IS_ACROSS_CONTAINERS);
    EnergyTerm.Factory edgesPullFactory = new AllEdgesEnergyTermFactory(edgesPull);
    return new SetOfTwo<EnergyTerm.Factory>(nodesRepulsionFactory, edgesPullFactory);
}
Also used : EnergyFunction(org.vcell.util.graphlayout.energybased.EnergySum.EnergyFunction) EnergyTerm(org.vcell.util.graphlayout.energybased.EnergySum.EnergyTerm) SetOfTwo(org.sbpax.util.sets.SetOfTwo)

Example 2 with EnergyFunction

use of org.vcell.util.graphlayout.energybased.EnergySum.EnergyFunction in project vcell by virtualcell.

the class WerewolfLayouter method createTermFactories.

public static Set<EnergyTerm.Factory> createTermFactories() {
    EnergyFunction nodesRepulsion = new NailShapeEnergyFunction(REPULSION_RANGE, REPULSION_STRENGTH);
    EnergyFunction edgesPull = new ParabularEnergyFunction(EDGE_SPRING_STRENGTH);
    EnergyTerm.Factory nodesRepulsionFactory = new AllNodePairsEnergyTermFactory(nodesRepulsion, REPULSION_IS_ACROSS_CONTAINERS);
    EnergyTerm.Factory edgesPullFactory = new AllEdgesEnergyTermFactory(edgesPull);
    return new SetOfTwo<EnergyTerm.Factory>(nodesRepulsionFactory, edgesPullFactory);
}
Also used : EnergyFunction(org.vcell.util.graphlayout.energybased.EnergySum.EnergyFunction) EnergyTerm(org.vcell.util.graphlayout.energybased.EnergySum.EnergyTerm) SetOfTwo(org.sbpax.util.sets.SetOfTwo)

Aggregations

SetOfTwo (org.sbpax.util.sets.SetOfTwo)2 EnergyFunction (org.vcell.util.graphlayout.energybased.EnergySum.EnergyFunction)2 EnergyTerm (org.vcell.util.graphlayout.energybased.EnergySum.EnergyTerm)2