Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <shogun/io/SGIO.h>
- #include <shogun/base/init.h>
- #include <shogun/lib/SGString.h>
- #include <shogun/lib/SGVector.h>
- #include <shogun/lib/DynamicObjectArray.h>
- #include <shogun/labels/StructuredLabels.h>
- #include <shogun/lib/List.h>
- using namespace shogun;
- #include <iostream>
- using namespace std;
- int main(int argc, char** argv)
- {
- init_shogun_with_defaults();
- CList* ll1 = new CList(true);
- CList* ll2 = new CList(true);
- CDynamicObjectArray* darr = new CDynamicObjectArray(100);
- SG_REF(darr);
- cout << darr->get_num_elements() << endl;
- darr->push_back(ll1);
- darr->push_back(ll2);
- cout << darr->get_num_elements() << endl;
- cout << dynamic_cast<CList*>(darr->get_element(0))->get_name() << endl;
- cout << dynamic_cast<CList*>(darr->get_element(1))->get_name() << endl;
- SG_UNREF(darr);
- //SG_UNREF(ll1);
- //SG_UNREF(ll2);
- exit_shogun();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement