00001 /* 00002 * Copyright 2007 Martin von Gagern 00003 * 00004 * 00005 * This file is part of mqn2mps. 00006 * 00007 * mqn2mps is free software; you can redistribute it and/or modify 00008 * it under the terms of the GNU General Public License as published by 00009 * the Free Software Foundation; either version 3 of the License, or 00010 * (at your option) any later version. 00011 * 00012 * mqn2mps is distributed in the hope that it will be useful, 00013 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00014 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00015 * GNU General Public License for more details. 00016 * 00017 * You should have received a copy of the GNU General Public License 00018 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00019 */ 00020 00021 00022 #ifndef VDIFF_HH 00023 #define VDIFF_HH 00024 00025 /** 00026 * @file 00027 * Interface of class vdiff. 00028 */ 00029 00030 /** 00031 * The class vdiff describes a set of difference vectors. 00032 * 00033 * The most important use of this class is the ability to compare sets 00034 * of difference vectors, so that these sets can be used as a map key. 00035 */ 00036 class vdiff { 00037 public: 00038 00039 vdiff(std::vector<const field*>& fields); 00040 field operator[](int col) const; 00041 bool operator<(const vdiff& d) const; 00042 00043 /** 00044 * Retrieve number of difference vecors. 00045 * This allows read-only access to the private member vdiff::cols. 00046 * @return the number of difference vectors. 00047 */ 00048 size_t num_cols() const { return cols; } 00049 00050 private: 00051 00052 /** 00053 * Number of rows in the matrix of difference vectors. 00054 */ 00055 int rows; 00056 00057 /** 00058 * Number of columns in the matrix of difference vectors. 00059 */ 00060 int cols; 00061 00062 /** 00063 * Matrix elements of the matrix of difference vectors. 00064 */ 00065 std::set< triplet<rational> > elements; 00066 00067 }; 00068 00069 #endif // ifndef VDIFF_HH
1.6.0