00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
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