PostgreSQL Source Code
git master
|
#include "postgres.h"
#include <math.h>
#include <limits.h>
#include "lib/knapsack.h"
#include "nodes/bitmapset.h"
#include "utils/memutils.h"
Go to the source code of this file.
Functions | |
Bitmapset * | DiscreteKnapsack (int max_weight, int num_items, int *item_weights, double *item_values) |
Bitmapset* DiscreteKnapsack | ( | int | max_weight, |
int | num_items, | ||
int * | item_weights, | ||
double * | item_values | ||
) |
Definition at line 52 of file knapsack.c.
References ALLOCSET_SMALL_SIZES, AllocSetContextCreate, Assert, bms_add_member(), bms_copy(), bms_del_member(), bms_make_singleton(), bms_replace_members(), CurrentMemoryContext, i, j, MemoryContextDelete(), MemoryContextSwitchTo(), palloc(), and values.
Referenced by consider_groupingsets_paths().