![]() |
RTBKit
0.9
Open-source framework to create real-time ad bidding systems.
|
#include <segments.h>
Inherits std::map< K, T >.
Public Member Functions | |
SegmentsBySource (SegmentsBySourceBase &&other) | |
SegmentsBySource (const SegmentsBySourceBase &other) | |
const SegmentList & | get (const std::string &str) const |
void | sortAll () |
void | add (const std::string &source, const std::shared_ptr< SegmentList > &segs) |
void | addSegment (const std::string &source, const std::shared_ptr< SegmentList > &segs) |
void | addInts (const std::string &source, const std::vector< int > &segs) |
void | addWeightedInts (const std::string &source, const std::vector< std::pair< int, float > > &segs) |
void | addStrings (const std::string &source, const std::vector< std::string > &segs) |
void | add (const std::string &source, const std::string &segment, float weight=1.0) |
void | add (const std::string &source, int segment, float weight=1.0) |
Json::Value | toJson () const |
void | serialize (ML::DB::Store_Writer &store) const |
void | reconstitute (ML::DB::Store_Reader &store) |
std::string | serializeToString () const |
Static Public Member Functions | |
static SegmentsBySource | createFromJson (const Json::Value &json) |
static SegmentsBySource | reconstituteFromString (const std::string &str) |
A set of segments per segment provider.
Definition at line 104 of file segments.h.
void RTBKIT::SegmentsBySource::add | ( | const std::string & | source, |
const std::string & | segment, | ||
float | weight = 1.0 |
||
) |
Add the given segment to the given source, creating if it didn't exist already.
Definition at line 459 of file segments.cc.
void RTBKIT::SegmentsBySource::add | ( | const std::string & | source, |
int | segment, | ||
float | weight = 1.0 |
||
) |
Add the given segment to the given source, creating if it didn't exist already.
Definition at line 468 of file segments.cc.