Go to the source code of this file.
|
| void | intvector_create_ (std::vector< int > **) |
| void | intvector_delete_ (std::vector< int > **) |
| void | intvector_clear_ (std::vector< int > **) |
| void | intvector_push_back_ (std::vector< int > **, const int *) |
| void | intvector_get_size_ (std::vector< int > **, int *) |
| void | intvector_get_redundant_ (std::vector< int > **, int *, int *, int *) |
| void | intvector_copy_to_ (const std::vector< int > **, int *) |
| void | intvector_copy_from_ (std::vector< int > **, const int *, const int *) |
| void | intvector_find_ (const std::vector< int > **, const int *, int *) |
| void _FCALL | INTVECTOR_CREATE (std::vector< int > **vec_ptr) |
| void _FCALL | INTVECTOR_DELETE (std::vector< int > **vec_ptr) |
| void _FCALL | INTVECTOR_CLEAR (std::vector< int > **vec_ptr) |
| void _FCALL | INTVECTOR_PUSH_BACK (std::vector< int > **vec_ptr, const int *i) |
| void _FCALL | INTVECTOR_GET_SIZE (std::vector< int > **vec_ptr, int *i) |
| void _FCALL | INTVECTOR_GET_REDUNDANT (std::vector< int > **vec_ptr, int *res, int *err, int *card) |
| void _FCALL | INTVECTOR_COPY_TO (const std::vector< int > **vec_ptr, int *res) |
| void _FCALL | INTVECTOR_COPY_FROM (std::vector< int > **vec_ptr, const int *res, const int *size) |
| void _FCALL | INTVECTOR_FIND (const std::vector< int > **vec_ptr, const int *what, int *where) |
◆ _FCALL
◆ INTVECTOR_CLEAR()
| void _FCALL INTVECTOR_CLEAR |
( |
std::vector< int > ** | vec_ptr | ) |
|
Definition at line 49 of file IntVector_api.cpp.
50 {
52 }
void intvector_clear_(std::vector< int > **)
◆ intvector_clear_()
| void intvector_clear_ |
( |
std::vector< int > ** | vec_ptr | ) |
|
◆ INTVECTOR_COPY_FROM()
| void _FCALL INTVECTOR_COPY_FROM |
( |
std::vector< int > ** | vec_ptr, |
|
|
const int * | res, |
|
|
const int * | size ) |
Definition at line 69 of file IntVector_api.cpp.
70 {
72 }
void intvector_copy_from_(std::vector< int > **, const int *, const int *)
◆ intvector_copy_from_()
| void intvector_copy_from_ |
( |
std::vector< int > ** | vec_ptr, |
|
|
const int * | res, |
|
|
const int * | size ) |
Definition at line 127 of file IntVector_api.cpp.
128{
129 (*vec_ptr)->resize(*size);
130 for (int i(0) ; i < *size ; ++i) {
131 (*vec_ptr)->at(i) = res[i];
132 }
133}
◆ INTVECTOR_COPY_TO()
| void _FCALL INTVECTOR_COPY_TO |
( |
const std::vector< int > ** | vec_ptr, |
|
|
int * | res ) |
Definition at line 65 of file IntVector_api.cpp.
66 {
68 }
void intvector_copy_to_(const std::vector< int > **, int *)
◆ intvector_copy_to_()
| void intvector_copy_to_ |
( |
const std::vector< int > ** | vec_ptr, |
|
|
int * | res ) |
Definition at line 119 of file IntVector_api.cpp.
120{
121 auto iter = (*vec_ptr)->begin();
122 for ( ; iter != (*vec_ptr)->end() ; ++iter) {
123 (*res++) = *iter;
124 }
125}
◆ INTVECTOR_CREATE()
| void _FCALL INTVECTOR_CREATE |
( |
std::vector< int > ** | vec_ptr | ) |
|
Definition at line 41 of file IntVector_api.cpp.
42 {
44 }
void intvector_create_(std::vector< int > **)
◆ intvector_create_()
| void intvector_create_ |
( |
std::vector< int > ** | vec_ptr | ) |
|
Definition at line 80 of file IntVector_api.cpp.
81{
82 *vec_ptr = new std::vector<int> ();
83}
◆ INTVECTOR_DELETE()
| void _FCALL INTVECTOR_DELETE |
( |
std::vector< int > ** | vec_ptr | ) |
|
Definition at line 45 of file IntVector_api.cpp.
46 {
48 }
void intvector_delete_(std::vector< int > **)
◆ intvector_delete_()
| void intvector_delete_ |
( |
std::vector< int > ** | vec_ptr | ) |
|
Definition at line 85 of file IntVector_api.cpp.
86{
87 delete(*vec_ptr);
88 *vec_ptr = nullptr;
89}
◆ INTVECTOR_FIND()
| void _FCALL INTVECTOR_FIND |
( |
const std::vector< int > ** | vec_ptr, |
|
|
const int * | what, |
|
|
int * | where ) |
Definition at line 73 of file IntVector_api.cpp.
74 {
76 }
void intvector_find_(const std::vector< int > **, const int *, int *)
◆ intvector_find_()
| void intvector_find_ |
( |
const std::vector< int > ** | vec_ptr, |
|
|
const int * | what, |
|
|
int * | where ) |
Definition at line 135 of file IntVector_api.cpp.
136{
137 *where = -1;
138 auto iter = std::find((*vec_ptr)->begin(), (*vec_ptr)->end(), *what);
139 if (iter != (*vec_ptr)->end()) {
140 *where = std::distance((*vec_ptr)->begin(), iter) + 1;
141 }
142}
◆ INTVECTOR_GET_REDUNDANT()
| void _FCALL INTVECTOR_GET_REDUNDANT |
( |
std::vector< int > ** | vec_ptr, |
|
|
int * | res, |
|
|
int * | err, |
|
|
int * | card ) |
Definition at line 61 of file IntVector_api.cpp.
62 {
64 }
void intvector_get_redundant_(std::vector< int > **, int *, int *, int *)
◆ intvector_get_redundant_()
| void intvector_get_redundant_ |
( |
std::vector< int > ** | vec_ptr, |
|
|
int * | res, |
|
|
int * | err, |
|
|
int * | card ) |
Definition at line 106 of file IntVector_api.cpp.
107{
108 auto correct_count = [&vec_ptr,&card](int ii) {return (*card == count((*vec_ptr)->begin(), (*vec_ptr)->end(), ii));};
109 auto iter = find_if((*vec_ptr)->begin(), (*vec_ptr)->end(), correct_count);
110 if (iter != (*vec_ptr)->end()) {
111 *res = *iter;
112 *err = 0;
113 } else {
114 *res = 0;
115 *err = 1;
116 }
117}
◆ INTVECTOR_GET_SIZE()
| void _FCALL INTVECTOR_GET_SIZE |
( |
std::vector< int > ** | vec_ptr, |
|
|
int * | i ) |
Definition at line 57 of file IntVector_api.cpp.
58 {
60 }
void intvector_get_size_(std::vector< int > **, int *)
◆ intvector_get_size_()
| void intvector_get_size_ |
( |
std::vector< int > ** | vec_ptr, |
|
|
int * | i ) |
◆ INTVECTOR_PUSH_BACK()
| void _FCALL INTVECTOR_PUSH_BACK |
( |
std::vector< int > ** | vec_ptr, |
|
|
const int * | i ) |
Definition at line 53 of file IntVector_api.cpp.
54 {
56 }
void intvector_push_back_(std::vector< int > **, const int *)
◆ intvector_push_back_()
| void intvector_push_back_ |
( |
std::vector< int > ** | vec_ptr, |
|
|
const int * | i ) |