summaryrefslogtreecommitdiff
path: root/p-spin.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'p-spin.cpp')
-rw-r--r--p-spin.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/p-spin.cpp b/p-spin.cpp
index 3691ed6..ba18c6a 100644
--- a/p-spin.cpp
+++ b/p-spin.cpp
@@ -1,25 +1,25 @@
#include "p-spin.hpp"
-inline Real fP(unsigned p, Real q) {
+inline Real fₚ(unsigned p, Real q) {
return 0.5 * pow(q, p);
}
-inline Real dfP(unsigned p, Real q) {
+inline Real ∂fₚ(unsigned p, Real q) {
return 0.5 * p * pow(q, p - 1);
}
-inline Real ddfP(unsigned p, Real q) {
+inline Real ∂∂fₚ(unsigned p, Real q) {
return 0.5 * p * (p - 1) * pow(q, p - 2);
}
Real f(Real λ, unsigned p, unsigned s, Real q) {
- return (1 - λ) * fP(p, q) + λ * fP(s, q);
+ return (1 - λ) * fₚ(p, q) + λ * fₚ(s, q);
}
-Real df(Real λ, unsigned p, unsigned s, Real q) {
- return (1 - λ) * dfP(p, q) + λ * dfP(s, q);
+Real ∂f(Real λ, unsigned p, unsigned s, Real q) {
+ return (1 - λ) * ∂fₚ(p, q) + λ * ∂fₚ(s, q);
}
-Real ddf(Real λ, unsigned p, unsigned s, Real q) {
- return (1 - λ) * ddfP(p, q) + λ * ddfP(s, q);
+Real ∂∂f(Real λ, unsigned p, unsigned s, Real q) {
+ return (1 - λ) * ∂∂fₚ(p, q) + λ * ∂∂fₚ(s, q);
}