-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmatrices_classes.pxd
More file actions
49 lines (39 loc) · 1.83 KB
/
matrices_classes.pxd
File metadata and controls
49 lines (39 loc) · 1.83 KB
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
49
# cython: language_level=3, boundscheck=False, wraparound=False
# cython: initializedcheck=False, cdivision=True, nonecheck=False
"""
matrices_classes.pxd - Matrix representations module
====================================================
This module contains declarations for convenient representations of matrices.
"""
import numpy as np
cimport numpy as np
cdef class ExperimentNo5Form:
cdef double sigma
cdef readonly Py_ssize_t shape[2]
cdef readonly np.dtype dtype
cdef inline double[:, ::1] dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] transpose_dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] left_dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] slice_columns(self, const int[::1] idx)
cdef class MatInSVDForm:
cdef readonly const double[:, ::1] U, V
cdef readonly const double[::1] sigma
cdef readonly ssize_t shape[2]
cdef readonly np.dtype dtype
cdef inline double[:, ::1] dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] transpose_dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] left_dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] slice_columns(self, const int[::1] idx)
cdef class MatInIDForm:
cdef readonly const double[:, ::1] B
cdef readonly const double[::1, :] P
cdef readonly size_t shape[2]
cdef readonly np.dtype dtype
cdef inline double[:, ::1] dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] transpose_dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] left_dot(self, const double[:, ::1] other_vector)
cdef inline double[:, ::1] slice_columns(self, const int[::1] idx)
ctypedef fused GeneralMat:
MatInSVDForm
MatInIDForm
ExperimentNo5Form