summaryrefslogtreecommitdiff
path: root/p-spin.cpp
diff options
context:
space:
mode:
authorJaron Kent-Dobias <jaron@kent-dobias.com>2025-05-19 12:17:36 -0300
committerJaron Kent-Dobias <jaron@kent-dobias.com>2025-05-19 12:17:36 -0300
commit7c44546421ed1c4bc6e5135ec90bccac2a0ac436 (patch)
tree9ac0e633f7b7a9e356ae8e53a2801365bc55de35 /p-spin.cpp
parent13bfd9e1cdfe3bc2cc109af67e0648516b5787ea (diff)
downloadcode-7c44546421ed1c4bc6e5135ec90bccac2a0ac436.tar.gz
code-7c44546421ed1c4bc6e5135ec90bccac2a0ac436.tar.bz2
code-7c44546421ed1c4bc6e5135ec90bccac2a0ac436.zip
Cleaned up header inclusions, and renamed some p-spin functions
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);
}