~ubuntu-branches/ubuntu/precise/jcsp/precise

« back to all changes in this revision

Viewing changes to src/jcsp-demos/doc-ex/jcsp/plugNplay/ints/PlexIntExample.java

  • Committer: Bazaar Package Importer
  • Author(s): Miguel Landaeta
  • Date: 2010-06-20 18:12:26 UTC
  • Revision ID: james.westby@ubuntu.com-20100620181226-8yg8d9rjjjiuy7oz
Tags: upstream-1.1-rc4
ImportĀ upstreamĀ versionĀ 1.1-rc4

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import org.jcsp.lang.*;
 
2
import org.jcsp.plugNplay.ints.*;
 
3
 
 
4
public class PlexIntExample {
 
5
 
 
6
  public static void main (String[] argv) {
 
7
 
 
8
    final One2OneChannelInt[] a = Channel.one2oneIntArray (3);
 
9
    final One2OneChannelInt b = Channel.one2oneInt ();
 
10
 
 
11
    new Parallel (
 
12
      new CSProcess[] {
 
13
        new NumbersInt (a[0].out ()),
 
14
        new FibonacciInt (a[1].out ()),
 
15
        new SquaresInt (a[2].out ()),
 
16
        new PlexInt (Channel.getInputArray (a), b.out ()),
 
17
        new PrinterInt (b.in (), "--> ", "\n")
 
18
      }
 
19
    ).run ();
 
20
 
 
21
  }
 
22
 
 
23
}