Read the equation
The complex mean of unit phase vectors has magnitude r between zero and one and phase ψ. The implementation returns the magnitude, which reaches one when all phases align and is unchanged by a common phase shift. This differs from the older project’s mean cosine score, which depends on the chosen phase origin.
Terms & definitions
| Term | Meaning in this source |
|---|---|
| r | Synchrony magnitude |
| psi | Mean phase |
| theta_j | Individual oscillator phases |
| N | Number of oscillators |
How it works
Read the definition from its right-hand expression to the quantity on the left. Its surrounding source records the intended input, state, or parameter context. Where the source leaves an operation unspecified, this page preserves that gap.
Assumptions & limits
Source recovery establishes that the expression appears in this record. Its mathematical validity, implementation behavior, and interpretation must be assessed separately. See the linked source and research notes for the checks available for this version.
Original context
Read the surrounding source passage
// Random phase in [0, 2π]
theta[i] = static_cast<float>(i) / N * 2.0f * M_PI;
// Random frequency around mean
omega[i] = omega_mean + omega_std * (static_cast<float>(i) / N - 0.5f);
}
}
// Order parameter r*e^(iψ) = (1/N) * Σ_j e^(iθ_j)
float order_parameter() const {
float cos_sum = 0.0f, sin_sum = 0.0f;
for (size_t i = 0; i < N; ++i) {
cos_sum += std::cos(theta[i]);
sin_sum += std::sin(theta[i]);
}
return std::sqrt(cos_sum*cos_sum + sin_sum*sin_sum) / N;
}
void step(float dt) {Exact original notation
Order parameter r*e^(iψ) = (1/N) * Σ_j e^(iθ_j)