mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 17:30:11 +02:00
format
This commit is contained in:
@@ -113,12 +113,12 @@ function wf_entropy(wf, x, y) =
|
|||||||
ln(sumOfWeights) - (sumOfWeightLogWeights / sumOfWeights);
|
ln(sumOfWeights) - (sumOfWeightLogWeights / sumOfWeights);
|
||||||
|
|
||||||
function _wf_entropy(weights, states, state_leng, sumOfWeights, sumOfWeightLogWeights, i = 0) =
|
function _wf_entropy(weights, states, state_leng, sumOfWeights, sumOfWeightLogWeights, i = 0) =
|
||||||
i == state_leng ? [sumOfWeights, sumOfWeightLogWeights] :
|
i == state_leng ? [sumOfWeights, sumOfWeightLogWeights] :
|
||||||
let(
|
let(
|
||||||
opt = states[i],
|
opt = states[i],
|
||||||
weight = hashmap_get(weights, opt)
|
weight = hashmap_get(weights, opt)
|
||||||
)
|
)
|
||||||
_wf_entropy(weights, states, state_leng, sumOfWeights + weight, sumOfWeightLogWeights + weight * ln(weight), i + 1);
|
_wf_entropy(weights, states, state_leng, sumOfWeights + weight, sumOfWeightLogWeights + weight * ln(weight), i + 1);
|
||||||
|
|
||||||
function _replaceStatesAt(wf, x, y, states) =
|
function _replaceStatesAt(wf, x, y, states) =
|
||||||
let(
|
let(
|
||||||
|
Reference in New Issue
Block a user