00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00028 #include <coconut_config.h>
00029 #include <boxes_delta.h>
00030 #include <print_seq.h>
00031 #include <api_exception.h>
00032
00033 namespace coco {
00034
00035 bool boxes_delta::apply(work_node& _x, undelta_base*& _u, const delta_id& _did) const
00036 {
00037 std::cerr << "Cannot directly apply a boxes_delta: convert missing!" <<
00038 std::endl;
00039 _u = NULL;
00040 return false;
00041 }
00042
00043 void boxes_delta::create_table(work_node& _x,
00044 vdbl::standard_table*& ptb,
00045 const std::string& __t) const
00046 {
00047 _x.get_database_ptr()->create_table("box", _x.get_dbuserid());
00048 ptb = (vdbl::standard_table*)
00049 _x.get_database_ptr()->get_table("box", _x.get_dbuserid());
00050 if(ptb == NULL)
00051 throw api_exception(apiee_delta, "Database inconsistency: Could not create box table!");
00052 ptb->add_col("x",
00053 vdbl::typed_col<std::vector<interval> >(std::vector<interval>()),
00054 vdbl::colflags());
00055 vdbl::colid _xi(ptb->get_col_id("x"));
00056 ptb->add_col("exclusion box", vdbl::typed_col<bool>(false),
00057 vdbl::colflags(true));
00058 ptb->add_col("intersecting", vdbl::method_col<box_check_intersection>(
00059 box_check_intersection(_xi)),
00060 vdbl::colflags(true));
00061
00062 ptb->add_col("contains optimum", vdbl::typed_col<bool>(false),
00063 vdbl::colflags(true));
00064 ptb->add_col("eval region", vdbl::typed_col<bool>(false),
00065 vdbl::colflags(true));
00066 }
00067
00068 }