AddEdge() public method

public AddEdge ( int channel, bool sense ) : void
channel int
sense bool
return void
Esempio n. 1
0
 public void AddEdge( int channel, int time, bool sense )
 {
     EdgeSet edgeSet = (EdgeSet)eventList[time];
     // is there already an edgeSet at this time ?
     if (edgeSet == null)
     {
         // If not add a new one
         edgeSet = new EdgeSet(channels);
         edgeSet.AddEdge(channel, sense);
         eventList[time] = edgeSet;
     }
     else
     {
         // else add the edge to the existing one
         edgeSet.AddEdge(channel, sense);
     }
 }
Esempio n. 2
0
        public void AddEdge(int channel, int time, bool sense)
        {
            EdgeSet edgeSet = (EdgeSet)EventList[time];

            // is there already an edgeSet at this time ?
            if (edgeSet == null)
            {
                // If not add a new one
                edgeSet = new EdgeSet(channels);
                edgeSet.AddEdge(channel, sense);
                EventList[time] = edgeSet;
            }
            else
            {
                // else add the edge to the existing one
                edgeSet.AddEdge(channel, sense);
            }
        }