typedef int (*GNUNET_HashCodeIterator) (void *cls,
GNUNET_HashCode * next);
+
/**
* Load a bloom-filter from a file.
*
int
k);
+
/**
* Create a bloom filter from raw bits.
*
int
k);
+
/**
* Copy the raw data of this bloomfilter into
* the given data array.
*bf, char *data,
size_t size);
+
/**
* Test if an element is in the filter.
* @param e the element
int GNUNET_CONTAINER_bloomfilter_test (const struct GNUNET_CONTAINER_BloomFilter
*bf, const GNUNET_HashCode * e);
+
/**
* Add an element to the filter
* @param bf the filter
void GNUNET_CONTAINER_bloomfilter_add (struct GNUNET_CONTAINER_BloomFilter
*bf, const GNUNET_HashCode * e);
+
/**
* Remove an element from the filter.
* @param bf the filter
void GNUNET_CONTAINER_bloomfilter_remove (struct GNUNET_CONTAINER_BloomFilter
*bf, const GNUNET_HashCode * e);
+
+/**
+ * Create a copy of a bloomfilter.
+ *
+ * @param bf the filter
+ * @return copy of bf
+ */
+struct GNUNET_CONTAINER_BloomFilter *
+GNUNET_CONTAINER_bloomfilter_copy (const struct GNUNET_CONTAINER_BloomFilter *bf);
+
+
+
/**
* Free the space associcated with a filter
* in memory, flush to drive if needed (do not
GNUNET_CONTAINER_heap_get_size (const struct GNUNET_CONTAINER_Heap *heap);
+/**
+ * Get the current cost of the node
+ *
+ * @param node the node to get the cost of
+ * @return cost of the node
+ */
+GNUNET_CONTAINER_HeapCostType
+GNUNET_CONTAINER_heap_node_get_cost (const struct GNUNET_CONTAINER_HeapNode *node);
+
/**
* Iterator for heap
*
*
*/
void *
-GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap, uint32_t max);
+GNUNET_CONTAINER_heap_get_random (struct GNUNET_CONTAINER_Heap *heap,
+ uint32_t max);
+
/**
* Perform a random walk of the tree. The walk is biased
/**
* Removes a node from the heap.
*
- * @param heap heap to modify
* @param node node to remove
* @return element data stored at the node, NULL if heap is empty
*/
void *
-GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_Heap *heap,
- struct GNUNET_CONTAINER_HeapNode *node);
+GNUNET_CONTAINER_heap_remove_node (struct GNUNET_CONTAINER_HeapNode *node);
/**