001    package net.sf.cpsolver.studentsct.heuristics.studentord;
002    
003    import java.util.Collections;
004    import java.util.Vector;
005    
006    import net.sf.cpsolver.ifs.util.DataProperties;
007    
008    /** 
009     * Return the given set of students in a random order 
010     * 
011     * @version
012     * StudentSct 1.1 (Student Sectioning)<br>
013     * Copyright (C) 2007 Tomáš Müller<br>
014     * <a href="mailto:muller@unitime.org">muller@unitime.org</a><br>
015     * Lazenska 391, 76314 Zlin, Czech Republic<br>
016     * <br>
017     * This library is free software; you can redistribute it and/or
018     * modify it under the terms of the GNU Lesser General Public
019     * License as published by the Free Software Foundation; either
020     * version 2.1 of the License, or (at your option) any later version.
021     * <br><br>
022     * This library is distributed in the hope that it will be useful,
023     * but WITHOUT ANY WARRANTY; without even the implied warranty of
024     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
025     * Lesser General Public License for more details.
026     * <br><br>
027     * You should have received a copy of the GNU Lesser General Public
028     * License along with this library; if not, write to the Free Software
029     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
030    */
031    public class StudentRandomOrder implements StudentOrder {
032        
033        public StudentRandomOrder(DataProperties config) {}
034    
035        /** Return the given set of students in a random order */
036        public Vector order(Vector students) {
037            Vector ret = new Vector(students);
038            Collections.shuffle(ret);
039            return ret;
040        }
041    
042    }