mirror of
https://github.com/wassname/scikit-image.git
synced 2026-06-28 23:57:58 +08:00
28 lines
556 B
Cython
28 lines
556 B
Cython
"""
|
|
Originally part of CellProfiler, code licensed under both GPL and BSD
|
|
licenses.
|
|
Website: http://www.cellprofiler.org
|
|
|
|
Copyright (c) 2003-2009 Massachusetts Institute of Technology
|
|
Copyright (c) 2009-2011 Broad Institute
|
|
All rights reserved.
|
|
|
|
Original author: Lee Kamentsky
|
|
"""
|
|
cimport numpy as cnp
|
|
|
|
|
|
cdef struct Heapitem:
|
|
cnp.int32_t value
|
|
cnp.int32_t age
|
|
Py_ssize_t index
|
|
|
|
|
|
cdef inline int smaller(Heapitem *a, Heapitem *b):
|
|
if a.value <> b.value:
|
|
return a.value < b.value
|
|
return a.age < b.age
|
|
|
|
|
|
include "heap_general.pxi"
|