BWAPI
|
00001 // Copyright (c) 1997-2007 ETH Zurich (Switzerland). 00002 // All rights reserved. 00003 // 00004 // This file is part of CGAL (www.cgal.org); you may redistribute it under 00005 // the terms of the Q Public License version 1.0. 00006 // See the file LICENSE.QPL distributed with CGAL. 00007 // 00008 // Licensees holding a valid commercial license may use this file in 00009 // accordance with the commercial license agreement provided with the software. 00010 // 00011 // This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE 00012 // WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. 00013 // 00014 // $URL: svn+ssh://scm.gforge.inria.fr/svn/cgal/branches/CGAL-3.5-branch/QP_solver/include/CGAL/QP_solver/Unbounded_direction.h $ 00015 // $Id: Unbounded_direction.h 38453 2007-04-27 00:34:44Z gaertner $ 00016 // 00017 // 00018 // Author(s) : Sven Schoenherr 00019 // Bernd Gaertner <gaertner@inf.ethz.ch> 00020 // Franz Wessendorp 00021 // Kaspar Fischer 00022 00023 #ifndef CGAL_QP_SOLVER_UNBOUNDED_DIRECTION_H 00024 #define CGAL_QP_SOLVER_UNBOUNDED_DIRECTION_H 00025 00026 CGAL_BEGIN_NAMESPACE 00027 template < typename Q, typename ET, typename Tags > 00028 ET QP_solver<Q, ET, Tags>::unbounded_direction_value(int i) const 00029 { 00030 if (is_basic(i)) { // basic variable? 00031 return direction == 1 ? -q_x_O[in_B[i]] : q_x_O[in_B[i]]; 00032 } else { // non-basic variable? 00033 if (i == j) // most recent entering variable? 00034 return direction == 1 ? d : -d; 00035 return et0; 00036 } 00037 } 00038 CGAL_END_NAMESPACE 00039 00040 #endif // CGAL_QP_SOLVER_UNBOUNDED_DIRECTION_H 00041 00042 // ===== EOF ==================================================================