00001 /* This file is part of the Solver for Udine Course Timetabling Problem based 00002 * on Multiphase Exploitation of Multiple Objective-/Value-restricted Submodels 00003 * (abbreviated MEMOS for Timetabling). 00004 * 00005 * Copyright 2009 Jakub Marecek 00006 * Copyright 2009 The University of Nottingham 00007 * http://www.cs.nott.ac.uk/~jxm/timetabling/memos/ 00008 * http://memos-solvers.sourceforge.net/ 00009 * 00010 * MEMOS for Timetabling is free software: you can redistribute it and/or 00011 * modify it under the terms of the GNU General Public License as published by 00012 * the Free Software Foundation, either version 3 of the License, or (at your 00013 * option) any later version. It would be greatly appreciated, however, if you 00014 * could cite the following paper in any work that uses it: 00015 * Edmund K. Burke, Jakub Marecek, Andrew J. Parkes, and Hana Rudova: 00016 * Decomposition, Reformulation, and Diving in University Course Timetabling. 00017 * Computers and Operations Research. DOI 10.1016/j.cor.2009.02.023 00018 */ 00019 00020 00021 #ifndef UDINE_CONFLICT_GRAPH 00022 #define UDINE_CONFLICT_GRAPH 00023 00024 #include <set> 00025 #include <vector> 00026 #include <utility> 00027 00028 #include "loader.h" 00029 00030 namespace Udine { 00031 00032 class Vertex { 00033 public: 00034 std::set<int> adj; // ajacent vertices 00035 int c; // color 00036 Vertex() { c = -1; } // constructor 00037 }; 00038 00039 typedef std::pair<int, int> Edge; 00040 00041 00042 class Graph { 00043 public: 00044 std::vector<Vertex> vs; 00045 std::vector<Edge> es; 00046 std::vector< std::vector<int> > cliques; 00047 public: 00048 virtual void generateConflictGraph(Instance &i); 00049 virtual void generateCliques(); 00050 virtual ~Graph() {}; 00051 }; 00052 00053 } 00054 00055 #endif // UDINE_CONFLICT_GRAPH
1.5.9