File: _k_means_common.pxd

package info (click to toggle)
scikit-learn 1.4.2%2Bdfsg-8
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 25,036 kB
  • sloc: python: 201,105; cpp: 5,790; ansic: 854; makefile: 304; sh: 56; javascript: 20
file content (48 lines) | stat: -rw-r--r-- 887 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
from cython cimport floating


cdef floating _euclidean_dense_dense(
    const floating*,
    const floating*,
    int,
    bint
) noexcept nogil

cdef floating _euclidean_sparse_dense(
    const floating[::1],
    const int[::1],
    const floating[::1],
    floating,
    bint
) noexcept nogil

cpdef void _relocate_empty_clusters_dense(
    const floating[:, ::1],
    const floating[::1],
    const floating[:, ::1],
    floating[:, ::1],
    floating[::1],
    const int[::1]
)

cpdef void _relocate_empty_clusters_sparse(
    const floating[::1],
    const int[::1],
    const int[::1],
    const floating[::1],
    const floating[:, ::1],
    floating[:, ::1],
    floating[::1],
    const int[::1]
)

cdef void _average_centers(
    floating[:, ::1],
    const floating[::1]
)

cdef void _center_shift(
    const floating[:, ::1],
    const floating[:, ::1],
    floating[::1]
)