Update comments
This commit is contained in:
1 parent
aeb2a47952
commit
6f603b52df
1 file changed
+13
-2
@@ -764,8 +764,13 @@
|
|||||||
|
|
||||||
|
|
||||||
//TODO: Algorithm missing
|
//TODO: Algorithm missing
|
||||||
// nth_element ( http://softwareengineering.stackexchange.com/questions/284767/kth-selection-routine-floyd-algorithm-489 )
|
// _nth_element ( http://softwareengineering.stackexchange.com/questions/284767/kth-selection-routine-floyd-algorithm-489 )
|
||||||
//, average
|
// _average
|
||||||
|
// _sort_uniq (_sort + _uniq)
|
||||||
|
// fast _uniq for array
|
||||||
|
// _map (like _for_each but returns the new container) How to do it in a function way? Already done as macro
|
||||||
|
// _flatten (takes a set of containers and returns a new container containing all flatten objects)
|
||||||
|
|
||||||
|
|
||||||
#define ALGOI_FOR_EACH(container, cont_oplist, func) do { \
|
#define ALGOI_FOR_EACH(container, cont_oplist, func) do { \
|
||||||
for M_EACH(item, container, cont_oplist) { \
|
for M_EACH(item, container, cont_oplist) { \
|
||||||
@@ -779,6 +784,7 @@
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define ALGOI_EXTRACT(contDst, contDstOplist, \
|
#define ALGOI_EXTRACT(contDst, contDstOplist, \
|
||||||
contSrc, contSrcOplist, \
|
contSrc, contSrcOplist, \
|
||||||
condFunc) do { \
|
condFunc) do { \
|
||||||
@@ -801,6 +807,7 @@
|
|||||||
M_IF_METHOD(REVERSE, contDstOplist) (M_CALL_REVERSE(contDstOplist, contDstOplist);, ) \
|
M_IF_METHOD(REVERSE, contDstOplist) (M_CALL_REVERSE(contDstOplist, contDstOplist);, ) \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
/* The different special patterns which will interpret as special */
|
/* The different special patterns which will interpret as special */
|
||||||
#define ALGOI_PATTERN_and_and ,
|
#define ALGOI_PATTERN_and_and ,
|
||||||
#define ALGOI_PATTERN_or_or ,
|
#define ALGOI_PATTERN_or_or ,
|
||||||
@@ -840,6 +847,7 @@
|
|||||||
} \
|
} \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define ALGOI_REDUCE_FOR_EACH(dest, cont, cont_oplist, reduceFunc, mapFunc) do { \
|
#define ALGOI_REDUCE_FOR_EACH(dest, cont, cont_oplist, reduceFunc, mapFunc) do { \
|
||||||
bool m_init_done = false; \
|
bool m_init_done = false; \
|
||||||
M_GET_SUBTYPE cont_oplist m_tmp; \
|
M_GET_SUBTYPE cont_oplist m_tmp; \
|
||||||
@@ -872,6 +880,7 @@
|
|||||||
M_CALL_CLEAR(M_GET_OPLIST cont_oplist, m_tmp); \
|
M_CALL_CLEAR(M_GET_OPLIST cont_oplist, m_tmp); \
|
||||||
} while (0)
|
} while (0)
|
||||||
|
|
||||||
|
|
||||||
#define ALGOI_INIT_VA_FUNC(d, a) \
|
#define ALGOI_INIT_VA_FUNC(d, a) \
|
||||||
M_RET_ARG2 d (M_RET_ARG1 d, a) M_DEFERRED_COMMA
|
M_RET_ARG2 d (M_RET_ARG1 d, a) M_DEFERRED_COMMA
|
||||||
|
|
||||||
@@ -880,6 +889,7 @@
|
|||||||
M_MAP2(ALGOI_INIT_VA_FUNC, (dest, M_GET_PUSH contOp, ) , __VA_ARGS__) \
|
M_MAP2(ALGOI_INIT_VA_FUNC, (dest, M_GET_PUSH contOp, ) , __VA_ARGS__) \
|
||||||
true)
|
true)
|
||||||
|
|
||||||
|
|
||||||
#define ALGO_LET_INIT_VAI(dest, ...) \
|
#define ALGO_LET_INIT_VAI(dest, ...) \
|
||||||
ALGOI_LET_INIT_VAI(M_C3(m_cont_, __LINE__, dest), dest, __VA_ARGS__)
|
ALGOI_LET_INIT_VAI(M_C3(m_cont_, __LINE__, dest), dest, __VA_ARGS__)
|
||||||
|
|
||||||
@@ -889,6 +899,7 @@
|
|||||||
cont && (ALGO_INIT_VAI (dest, contOp, __VA_ARGS__), true); \
|
cont && (ALGO_INIT_VAI (dest, contOp, __VA_ARGS__), true); \
|
||||||
(M_CALL_CLEAR(contOp, dest), cont = false))
|
(M_CALL_CLEAR(contOp, dest), cont = false))
|
||||||
|
|
||||||
|
|
||||||
#define ALGOI_INSERT_AT(contDst, contDstOp, position, contSrc, contSrcOp) do { \
|
#define ALGOI_INSERT_AT(contDst, contDstOp, position, contSrc, contSrcOp) do { \
|
||||||
M_GET_IT_TYPE contSrcOp itSrc; \
|
M_GET_IT_TYPE contSrcOp itSrc; \
|
||||||
M_GET_IT_TYPE contDstOp itDst; \
|
M_GET_IT_TYPE contDstOp itDst; \
|
||||||
|
|||||||
Reference in new issue
Block a user