示例#1
0
 internal RelativePosition GetRelativePosition(ParallelAlgorithm pa)
 {
     RelativePosition res;
     if(!this.relativePositions.TryGetValue(pa, out res)) {
         return null;
     }
     return res;
 }
示例#2
0
 public void AddEdge(ParallelAlgorithm pa1, ParallelAlgorithm pa2)
 {
     this.AddEdge(new Edge(pa1, pa2));
 }
示例#3
0
 internal void AddInitArguments(ParallelAlgorithm pa, string[] initializationArguments)
 {
     this.initArgs.Add(pa, initializationArguments);
 }
示例#4
0
 internal void AddRelativePosition(ParallelAlgorithm pa, RelativePosition rp)
 {
     this.relativePositions.Add(pa, rp);
 }
示例#5
0
 public VectorMessage(ParallelAlgorithm sender, ParallelAlgorithm receiver, double[] data)
     : base(sender,receiver)
 {
     this.data = data;
 }
示例#6
0
 public void AddParallelAlgorithm(ParallelAlgorithm pa)
 {
     pa.Simulator = this;
     pa.Id = this.algorithms.Count;
     this.algorithms.Add(pa);
     foreach(Edge e in pa.Edges) {
         this.edges.Add(e);
     }
 }
示例#7
0
 protected Message(ParallelAlgorithm sender, ParallelAlgorithm receiver)
 {
     this.sender = sender;
     this.receiver = receiver;
 }
示例#8
0
文件: Edge.cs 项目: KommuSoft/ParVis
 public Edge(ParallelAlgorithm node1, ParallelAlgorithm node2)
 {
     this.node1 = node1;
     this.node2 = node2;
 }
示例#9
0
文件: Edge.cs 项目: KommuSoft/ParVis
 public ParallelAlgorithm Other(ParallelAlgorithm node)
 {
     if(node == this.Node1) {
         return this.Node2;
     }
     else {
         return this.Node1;
     }
 }
示例#10
0
文件: Edge.cs 项目: KommuSoft/ParVis
 public bool IsNode(ParallelAlgorithm node)
 {
     return (this.Node1 == node || this.Node2 == node);
 }
示例#11
0
 public TextMessage(ParallelAlgorithm sender, ParallelAlgorithm receiver, string message)
     : base(sender, receiver)
 {
     this.message = message;
 }