请教个 java 的 parallelism 问题# Programming - 葵花宝典
k*e
1 楼
今天想实现前两天大家讨论的minmaxheap找median,结果碰到一个问题。
I want pass function pointer to create a heap that has comparison function
as I defined. Thus I don't need both minHeap maxHeap. By the way, because I
have heap with template parameters, I also need function pointers with
template parameter.
It looks like:
template
class Heap {
private:
T* data;
public:
Heap(const vector& dataSrc, bool (*cmp)(T, T);
};
However, I cannot get a function pointer with template parameter. I really
had no idea h
I want pass function pointer to create a heap that has comparison function
as I defined. Thus I don't need both minHeap maxHeap. By the way, because I
have heap with template parameters, I also need function pointers with
template parameter.
It looks like:
template
class Heap {
private:
T* data;
public:
Heap(const vector
};
However, I cannot get a function pointer with template parameter. I really
had no idea h