File: base.pxd

package info (click to toggle)
python-pomegranate 0.15.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 36,948 kB
  • sloc: python: 11,489; makefile: 259; sh: 28
file content (27 lines) | stat: -rw-r--r-- 680 bytes parent folder | download | duplicates (4)
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
# base.pxd
# Contact: Jacob Schreiber (jmschreiber91@gmail.com)

cimport numpy

cdef class Model(object):
	cdef public str name
	cdef public int d
	cdef public bint frozen
	cdef public str model

	cdef void _log_probability(self, double* symbol, double* log_probability, int n) nogil
	cdef double _vl_log_probability(self, double* symbol, int n) nogil
	cdef double _summarize(self, double* items, double* weights, int n,
		int column_idx, int d) nogil


cdef class GraphModel(Model):
	cdef public list states, edges
	cdef public object graph
	cdef int n_edges, n_states


cdef class State(object):
	cdef public object distribution
	cdef public str name
	cdef public double weight