/* Cadabra: a field-theory motivated computer algebra system. Copyright (C) 2001-2011 Kasper Peeters This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . */ #include "YoungTab.hh" #include namespace yngtab { tableau_base::tableau_base() : multiplicity(1), selfdual_column(0) { } tableau_base::~tableau_base() { } tableau::~tableau() { } tableau::tableau() : tableau_base() { } tableau::tableau(const tableau& other) { rows=other.rows; } void tableau_base::add_row(unsigned int row_size) { assert(row_size>0); unsigned int row=number_of_rows(); for(unsigned int i=0; i=rows.size()) { unsigned int prevsize=rows.size(); rows.resize(rownum+1); for(unsigned int i=prevsize; i0); if((--rows[rownum])==0) rows.pop_back(); } unsigned int tableau::number_of_rows() const { return rows.size(); } unsigned int tableau::row_size(unsigned int num) const { assert(num >& prev, // const std::vector >& ths, // int colpos, int rowpos) // { // // Note the initial condition: upon startup, the prev vector contains as many -1,-1 // // pairs as boxes in the first row of tableau 2. So 'prevabove' will initially evaluate // // to this number. // // int prevabove=0; // number of boxes of the previous row added above the candidate position // int thisabove=0; // number of boxes of the current row added above the candidate position // for(unsigned int i=0; ithisabove) return true; // return false; // } #ifndef __CYGWIN__ #ifndef _WIN32 template<> void add_box(tableau& tab1, unsigned int row1, const tableau&, unsigned int, unsigned int) { tab1.add_box(row1); } #endif #endif };