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 <ie_rettype.h>
00030
00031 namespace coco {
00032
00033
00034 const std::list<delta_id>& ie_return_type::get(work_node& wn,
00035 double thresh)
00036 {
00037 using namespace vdbl;
00038 std::list<delta>::iterator __b, __e, __rf;
00039 std::list<double>::iterator __w, __wf;
00040 std::list<certificate>::iterator __c, __cf;
00041
00042 _d.clear();
00043 __e = deltas.end();
00044 for(__b = deltas.begin(), __w = weights.begin(), __c = certs.begin();
00045 __b != __e;)
00046 {
00047 if(*__w >= thresh)
00048 {
00049
00050
00051
00052 _d.push_back((*__b).store(wn, *__c));
00053 __rf = __b;
00054 __wf = __w;
00055 __cf = __c;
00056 ++__b;
00057 ++__w;
00058 ++__c;
00059 deltas.erase(__rf);
00060 weights.erase(__wf);
00061 certs.erase(__cf);
00062 }
00063 else
00064 {
00065 ++__b;
00066 ++__w;
00067 ++__c;
00068 }
00069 }
00070 return _d;
00071 }
00072
00073
00074 void ie_return_type::getd(std::list<delta>& dels, std::list<certificate>& certl,
00075 double thresh)
00076 {
00077 std::list<delta>::iterator __b, __e, __rf;
00078 std::list<double>::iterator __w, __wf;
00079 std::list<certificate>::iterator __c, __cf;
00080
00081 __e = deltas.end();
00082 for(__b = deltas.begin(), __w = weights.begin(), __c = certs.begin();
00083 __b != __e;)
00084 {
00085 if(*__w >= thresh)
00086 {
00087 dels.push_back(*__b);
00088 certl.push_back(*__c);
00089 __rf = __b;
00090 __wf = __w;
00091 __cf = __c;
00092 ++__b;
00093 ++__w;
00094 ++__c;
00095 deltas.erase(__rf);
00096 weights.erase(__wf);
00097 certs.erase(__cf);
00098 }
00099 else
00100 {
00101 ++__b;
00102 ++__w;
00103 ++__c;
00104 }
00105 }
00106 }
00107
00108 }