Generated on Fri Oct 6 16:26:43 2006 for Gecode/J by doxygen 1.4.7

Group.java

Go to the documentation of this file.
00001 /*
00002  *  Main authors:
00003  *     Guido Tack <tack@gecode.org>
00004  *
00005  *  Copyright:
00006  *     Guido Tack, 2006
00007  *
00008  *  Last modified:
00009  *     $Date: 2006-02-09 16:32:56 +0100 (Thu, 09 Feb 2006) $ by $Author: tack $
00010  *     $Revision: 2943 $
00011  *
00012  *  This file is part of Gecode, the generic constraint
00013  *  development environment:
00014  *     http://www.gecode.org
00015  *
00016  *  See the file "LICENSE" for information on usage and
00017  *  redistribution of this file, and for a
00018  *     DISCLAIMER OF ALL WARRANTIES.
00019  *
00020  */
00021 
00022 package org.gecode.explorer.postscript;
00023 
00024 import java.io.Writer;
00025 import java.io.IOException;
00026 
00027 import java.util.ArrayList;
00028 
00029 public class Group extends Path {
00030     private ArrayList<Path> ps;
00031 
00032     public Group(ArrayList<Path> ps0) {
00033         ps = ps0;
00034     }
00035 
00036     void emit(Writer out) throws IOException {
00037         for (Path p : ps) {
00038             p.emit(out);
00039         }
00040     }
00041 
00042     BoundingBox bb() {
00043         BoundingBox b = new BoundingBox(100000,100000,0,0);
00044         for (Path p : ps) {
00045             b.merge(p.bb());
00046         }
00047         return b;
00048     }
00049 }