00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #ifndef _CJLS_GEOWAX_H_
00021 #define _CJLS_GEOWAX_H_ 1
00022
00023 #include <string>
00024 #include "CjNLTopology.hh"
00025 #include "CjMatrix.hh"
00026 #include "CjLinkSelector.hh"
00027
00028 namespace jmitie {
00029 namespace corelib {
00030 class CjLS_geowax : public CjLinkSelector {
00031 public:
00032
00033 static std::string getName_static() { return "geowax"; }
00034 virtual std::string getName() const { return getName_static(); }
00035 std::string getProperty(const std::string & prop) const { return getProperty_static(prop); }
00036 static std::string getProperty_static(const std::string & opt) {
00037 if(opt=="desc") return "Selects a link or node-pair preferring those with a higher Waxman probability i.e. alpha * exp(-geographic_distance_between_nodes_in_pair/beta).";
00038 if(opt=="usage") return getProperty_static("desc") + "\n" +
00039 "alpha=float\tSpecifies the value to use for the exponent co-efficient.\n" \
00040 "beta=float\tSpecifies the value to use for the distance co-efficient.\n" \
00041 "[no_warn]\tDisables the warning about values of alpha and beta outside of expected bounds.\n"\
00042 "[dupe_ok]\tIf specified a node pairs which are already connected are included in the node-pair selection(only applies when adding links).\n";
00043 throw std::invalid_argument("CjLS_geowax::getProperty_static(" + opt + "): Unknown property requested.");
00044 }
00045
00046 CjLS_geowax(std::string args, const ctor_va_t & va );
00047
00048 virtual bool selectLink( select_arg_t &, unsigned int & from, unsigned int & to );
00049 virtual ~CjLS_geowax() {};
00050
00051 protected:
00052 bool m_add_remove;
00053 double m_alpha;
00054 double m_beta;
00055 bool m_dupe_link_ok;
00056 bool m_alpha_beta_warn;
00057
00058 private:
00059
00060 };
00061 }
00062 }
00063
00064 #endif // _CJLS_GEOWAX_H_