Removed Entropy Events. Those would slow down.
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 4m50s
All checks were successful
🚀 Pack skyscraper8 / make-zip (push) Successful in 4m50s
This commit is contained in:
parent
8aa9ac82d4
commit
6d3f352bc5
@ -2,7 +2,7 @@
|
||||
"profiles": {
|
||||
"skyscraper8": {
|
||||
"commandName": "Project",
|
||||
"commandLineArgs": "\"F:\\utena\\0008W_Thor\\recap-max-sx8\\skyscraper_20251029_2110_0008W_10841_V_24497.ts\"",
|
||||
"commandLineArgs": "cscan tcp://127.0.0.1:6969",
|
||||
"remoteDebugEnabled": false
|
||||
},
|
||||
"Container (Dockerfile)": {
|
||||
|
||||
@ -56,21 +56,6 @@ namespace skyscraper8.Skyscraper.Math
|
||||
newEntropy -= p_i * System.Math.Log2(p_i);
|
||||
}
|
||||
|
||||
//Raise events if we feel like it
|
||||
if (EntropyRising != null || EntropyFalling != null)
|
||||
{
|
||||
if (newEntropy != Entropy)
|
||||
{
|
||||
double oldEntropy = Entropy;
|
||||
double oldPercentage = Percentage;
|
||||
double newPercentage = (newEntropy / 8.0) * 100.0;
|
||||
if (newEntropy > Entropy)
|
||||
EntropyRising?.Invoke(oldEntropy, newEntropy, oldPercentage, newPercentage);
|
||||
else if (newEntropy < Entropy)
|
||||
EntropyFalling?.Invoke(oldEntropy, newEntropy, oldPercentage, newPercentage);
|
||||
}
|
||||
}
|
||||
|
||||
_entropy = newEntropy;
|
||||
}
|
||||
|
||||
@ -104,10 +89,5 @@ namespace skyscraper8.Skyscraper.Math
|
||||
return (Entropy / 8.0) * 100.0;
|
||||
}
|
||||
}
|
||||
|
||||
public delegate void EntropyCallback(double oldEntropy, double newEntropy, double oldPercentage, double newPercentage);
|
||||
|
||||
public event EntropyCallback EntropyRising;
|
||||
public event EntropyCallback EntropyFalling;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user