blob: 1904ea934a59f409c764e8dc17ae23c8613ada9f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
from cython.cimports.libc.math import sin
@cython.cclass
class Function:
@cython.ccall
def evaluate(self, x: float) -> float:
return 0
@cython.cclass
class SinOfSquareFunction(Function):
@cython.ccall
def evaluate(self, x: float) -> float:
return sin(x ** 2)
|