Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

point_delta.cc

Go to the documentation of this file.
00001 // Point Delta implementation -*- C++ -*-
00002 
00003 // Copyright (C) 2001-2003 Hermann Schichl
00004 //
00005 // This file is part of the COCONUT API.  This library
00006 // is free software; you can redistribute it and/or modify it under the
00007 // terms of the Library GNU General Public License as published by the
00008 // Free Software Foundation; either version 2, or (at your option)
00009 // any later version.
00010 
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014 // Library GNU General Public License for more details.
00015 
00016 // As a special exception, you may use this file as part of a free software
00017 // library without restriction.  Specifically, if other files instantiate
00018 // templates or use macros or inline functions from this file, or you compile
00019 // this file and link it with other files to produce an executable, this
00020 // file does not by itself cause the resulting executable to be covered by
00021 // the Library GNU General Public License.  This exception does not however
00022 // invalidate any other reasons why the executable file might be covered by
00023 // the Library GNU General Public License.
00024 
00027 #include <point_delta.h>
00028 #include <print_seq.h>
00029 
00030 bool point_delta::apply(work_node& _x, undelta_base*& _u) const
00031 {
00032   std::cerr << "Cannot directly apply a point_delta: convert missing!" <<
00033         std::endl;
00034   _u = NULL;
00035   return false;
00036 }
00037 
00038 void point_delta::create_table(work_node& _x,
00039                                           vdbl::standard_table*& ptb,
00040                                           const std::string& __t) const
00041 {
00042   _x.get_database_ptr()->create_table("point", _x.get_dbuserid());
00043   ptb = (vdbl::standard_table*)
00044               _x.get_database_ptr()->get_table("point", _x.get_dbuserid());
00045   if(ptb == NULL)
00046     throw "Database inconsistency: Programming Error!";
00047   ptb->add_col("x",
00048       vdbl::typed_col<std::vector<double> >(std::vector<double>()),
00049                           vdbl::colflags());
00050   ptb->add_col("L_mult",
00051       vdbl::typed_col<std::vector<double> >(std::vector<double>()),
00052                           vdbl::colflags(true));
00053   ptb->add_col("f", vdbl::typed_col<double>(INFINITY),
00054                           vdbl::colflags(true));
00055   ptb->add_col("kappa", vdbl::typed_col<double>(1.), vdbl::colflags(true));
00056   ptb->add_col("best", vdbl::typed_col<bool>(false), vdbl::colflags(true));
00057   ptb->add_col("verified", vdbl::typed_col<bool>(false),
00058                               vdbl::colflags(true));
00059   vdbl::colid _xi(ptb->get_col_id("x")),
00060               _Li(ptb->get_col_id("L_mult")),
00061               _fi(ptb->get_col_id("f"));
00062   ptb->add_col("feasible", vdbl::method_col<point_check_feasibility>(
00063                         point_check_feasibility(_xi, _Li, _fi)),
00064                vdbl::colflags(true));
00065                          
00066   ptb->add_col("optimal", vdbl::typed_col<bool>(false),
00067                               vdbl::colflags(true));
00068   ptb->add_col("global", vdbl::typed_col<bool>(false),
00069                               vdbl::colflags(true));
00070   ptb->add_col("relaxation", vdbl::typed_col<bool>(false),
00071                               vdbl::colflags(true));
00072   ptb->add_col("class", vdbl::typed_col<unsigned int>(0),
00073                               vdbl::colflags(true));
00074 }
00075 

Generated on Tue Nov 4 01:57:58 2003 for COCONUT API by doxygen1.2.18