386 * @see ucx_list_remove() |
388 * @see ucx_list_remove() |
387 */ |
389 */ |
388 UcxList *ucx_list_remove_a(UcxAllocator *allocator, UcxList *list, |
390 UcxList *ucx_list_remove_a(UcxAllocator *allocator, UcxList *list, |
389 UcxList *element); |
391 UcxList *element); |
390 |
392 |
|
393 /** |
|
394 * Returns the union of two lists. |
|
395 * |
|
396 * The union is a list of unique elements regarding cmpfnc obtained from |
|
397 * both source lists. |
|
398 * |
|
399 * @param left the left source list |
|
400 * @param right the right source list |
|
401 * @param cmpfnc a function to compare elements |
|
402 * @param cmpdata additional data for the compare function |
|
403 * @param cpfnc a function to copy the elements |
|
404 * @param cpdata additional data for the copy function |
|
405 * @return a new list containing the union |
|
406 */ |
|
407 UcxList* ucx_list_union(const UcxList *left, const UcxList *right, |
|
408 cmp_func cmpfnc, void* cmpdata, |
|
409 copy_func cpfnc, void* cpdata); |
|
410 |
|
411 /** |
|
412 * Returns the union of two lists. |
|
413 * |
|
414 * The union is a list of unique elements regarding cmpfnc obtained from |
|
415 * both source lists. |
|
416 * |
|
417 * @param allocator allocates the new list elements |
|
418 * @param left the left source list |
|
419 * @param right the right source list |
|
420 * @param cmpfnc a function to compare elements |
|
421 * @param cmpdata additional data for the compare function |
|
422 * @param cpfnc a function to copy the elements |
|
423 * @param cpdata additional data for the copy function |
|
424 * @return a new list containing the union |
|
425 */ |
|
426 UcxList* ucx_list_union_a(UcxAllocator *allocator, |
|
427 const UcxList *left, const UcxList *right, |
|
428 cmp_func cmpfnc, void* cmpdata, |
|
429 copy_func cpfnc, void* cpdata); |
|
430 |
|
431 /** |
|
432 * Returns the intersection of two lists. |
|
433 * |
|
434 * The intersection contains all elements of the left list |
|
435 * (including duplicates) that can be found in the right list. |
|
436 * |
|
437 * @param left the left source list |
|
438 * @param right the right source list |
|
439 * @param cmpfnc a function to compare elements |
|
440 * @param cmpdata additional data for the compare function |
|
441 * @param cpfnc a function to copy the elements |
|
442 * @param cpdata additional data for the copy function |
|
443 * @return a new list containing the intersection |
|
444 */ |
|
445 UcxList* ucx_list_intersection(const UcxList *left, const UcxList *right, |
|
446 cmp_func cmpfnc, void* cmpdata, |
|
447 copy_func cpfnc, void* cpdata); |
|
448 |
|
449 /** |
|
450 * Returns the intersection of two lists. |
|
451 * |
|
452 * The intersection contains all elements of the left list |
|
453 * (including duplicates) that can be found in the right list. |
|
454 * |
|
455 * @param allocator allocates the new list elements |
|
456 * @param left the left source list |
|
457 * @param right the right source list |
|
458 * @param cmpfnc a function to compare elements |
|
459 * @param cmpdata additional data for the compare function |
|
460 * @param cpfnc a function to copy the elements |
|
461 * @param cpdata additional data for the copy function |
|
462 * @return a new list containing the intersection |
|
463 */ |
|
464 UcxList* ucx_list_intersection_a(UcxAllocator *allocator, |
|
465 const UcxList *left, const UcxList *right, |
|
466 cmp_func cmpfnc, void* cmpdata, |
|
467 copy_func cpfnc, void* cpdata); |
|
468 |
|
469 /** |
|
470 * Returns the difference of two lists. |
|
471 * |
|
472 * The difference contains all elements of the left list |
|
473 * (including duplicates) that are not equal to any element of the right list. |
|
474 * |
|
475 * @param left the left source list |
|
476 * @param right the right source list |
|
477 * @param cmpfnc a function to compare elements |
|
478 * @param cmpdata additional data for the compare function |
|
479 * @param cpfnc a function to copy the elements |
|
480 * @param cpdata additional data for the copy function |
|
481 * @return a new list containing the difference |
|
482 */ |
|
483 UcxList* ucx_list_difference(const UcxList *left, const UcxList *right, |
|
484 cmp_func cmpfnc, void* cmpdata, |
|
485 copy_func cpfnc, void* cpdata); |
|
486 |
|
487 /** |
|
488 * Returns the difference of two lists. |
|
489 * |
|
490 * The difference contains all elements of the left list |
|
491 * (including duplicates) that are not equal to any element of the right list. |
|
492 * |
|
493 * @param allocator allocates the new list elements |
|
494 * @param left the left source list |
|
495 * @param right the right source list |
|
496 * @param cmpfnc a function to compare elements |
|
497 * @param cmpdata additional data for the compare function |
|
498 * @param cpfnc a function to copy the elements |
|
499 * @param cpdata additional data for the copy function |
|
500 * @return a new list containing the difference |
|
501 */ |
|
502 UcxList* ucx_list_difference_a(UcxAllocator *allocator, |
|
503 const UcxList *left, const UcxList *right, |
|
504 cmp_func cmpfnc, void* cmpdata, |
|
505 copy_func cpfnc, void* cpdata); |
|
506 |
391 #ifdef __cplusplus |
507 #ifdef __cplusplus |
392 } |
508 } |
393 #endif |
509 #endif |
394 |
510 |
395 #endif /* UCX_LIST_H */ |
511 #endif /* UCX_LIST_H */ |