Package edu.isi.karma.modeling.steiner.topk

Examples of edu.isi.karma.modeling.steiner.topk.SteinerEdge


  }
  public boolean addLink(Node source, Node target, DefaultLink link) {
    if (super.addLink(source, target, link)) {
      SteinerNode n1 = new SteinerNode(source.getId());
      SteinerNode n2 = new SteinerNode(target.getId());
      SteinerEdge e = new SteinerEdge(n1, link.getId(), n2, (float)link.getWeight());
      getTopKGraph().get(n1).add(e);
      getTopKGraph().get(n2).add(e);
      return true;
    } else
      return false;
View Full Code Here


 
  public boolean addLink(Node source, Node target, DefaultLink link, Double weight) {
    if (super.addLink(source, target, link, weight)) {
      SteinerNode n1 = new SteinerNode(source.getId());
      SteinerNode n2 = new SteinerNode(target.getId());
      SteinerEdge e = new SteinerEdge(n1, link.getId(), n2, (float)weight.doubleValue());
      getTopKGraph().get(n1).add(e);
      getTopKGraph().get(n2).add(e);
      return true;
    } else
      return false;
View Full Code Here

 
  public boolean removeLink(DefaultLink link) {
    if (super.removeLink(link)) {
      SteinerNode n1 = new SteinerNode(link.getSource().getId());
      SteinerNode n2 = new SteinerNode(link.getTarget().getId());
      SteinerEdge e = new SteinerEdge(n1, link.getId(), n2, (float)link.getWeight());
      getTopKGraph().get(n1).remove(e);
      getTopKGraph().get(n2).remove(e);
      return true;
    } else
      return false;
View Full Code Here

 
  public void changeLinkWeight(DefaultLink link, double weight) {
    super.changeLinkWeight(link, weight);
    SteinerNode n1 = new SteinerNode(link.getSource().getId());
    SteinerNode n2 = new SteinerNode(link.getTarget().getId());
    SteinerEdge e = new SteinerEdge(n1, link.getId(), n2, (float)weight);
    getTopKGraph().get(n1).remove(e);
    getTopKGraph().get(n2).remove(e);
    getTopKGraph().get(n1).add(e);
    getTopKGraph().get(n2).add(e);
  }
View Full Code Here

TOP

Related Classes of edu.isi.karma.modeling.steiner.topk.SteinerEdge

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.