1
1
# OrthNet
2
- TensorFlow and PyTorch layers for generating multi-dimensional Orthogonal Polynomials
2
+ TensorFlow, PyTorch and Numpy layers for generating multi-dimensional Orthogonal Polynomials
3
3
4
4
## Installation:
5
5
1 . the stable version:
@@ -13,7 +13,7 @@ python3 setup.py build_ext --inplace && python3 setup.py install
13
13
14
14
---
15
15
## Orthogonal polynomials supported:
16
- - [ Legendre polynomial] ( https://en.wikipedia.org/wiki/Legendre_polynomials )
16
+ - [ Legendre polynomial] ( https://en.wikipedia.org/wiki/Legendre_polynomials ) with Normalized Legendre polynomial
17
17
- [ Laguerre polynomial] ( https://en.wikipedia.org/wiki/Laguerre_polynomials )
18
18
- [ Hermite polynomial] ( https://en.wikipedia.org/wiki/Hermite_polynomials )
19
19
- hermite: He(x) in Wiki, the poly in probability theory
@@ -24,14 +24,32 @@ python3 setup.py build_ext --inplace && python3 setup.py install
24
24
- [ Jacobi polynomial] ( https://en.wikipedia.org/wiki/Jacobi_polynomials )
25
25
26
26
---
27
- ## Usage: check ` demo/ ` folder.
28
27
29
- ## Attributes:
30
- Class ` Poly ` :
28
+ ## Classes:
29
+ - orthnet.Legendre(Poly)
30
+ - orthnet.Legendre_Normalized(Poly)
31
+ - orthnet.Laguerre(Poly)
32
+ - orthnet.Hermite(Poly)
33
+ - orthnet.Hermite2(Poly)
34
+ - orthnet.Chebyshev(Poly)
35
+ - orthnet.Chebyshev2(Poly)
36
+ - orthnet.Jacobi(Poly)
37
+
38
+ ## Base class:
39
+ Class ` Poly(module, degree, x, dtype = 'float32', loglevel = 0) ` :
40
+
41
+ - Inputs:
42
+ + module: one of {'tensorflow', 'pytorch', 'numpy'}
43
+ + degree: the highest degree of target polynomial
44
+ + x: input tensor of type {tf.placaholder, tf.Variable, torch.Variable, torch.Tensor, numpy.ndarray, numpy.matrix}
45
+ + dtype: 'float32' or 'float64'
46
+ + loglevel: 1 to print time cost and 0 to mute
47
+
31
48
- ` Poly.tensor ` : return a tensor of function values
32
49
- ` Poly.combination ` : return the combination of dimensions, in lexicographical order
33
50
- ` Poly.index ` : return the index of the first combination of each degree in ` self.combination `
34
51
- ` Poly.update(degree) ` : update the degree of polynomial
35
52
- ` Poly.get_combination(start, end): ` : return the combination of degrees from ` start ` (included) till ` end ` (included)
36
53
- ` Poly.get_poly(start, end) ` : return the polynomials of degrees from ` start ` (included) till ` end ` (included)
37
54
- ` Poly.eval(coefficients) ` : evaluate the value of polynomial with coefficients
55
+ - ` Poly.quadrature(func, weight) ` : evaluate Gauss quadrature with target function and weights
0 commit comments