Get Independent Copy
Name
UxHwDoubleGetIndependentCopy
, UxHwFloatGetIndependentCopy
— Return a copy of the input distribution that is stripped of all correlations.
Synopsis
#include <stddef.h>
#include <uxhw.h>
double UxHwDoubleGetIndependentCopy(double value);
float UxHwFloatGetIndependentCopy(float value);
Description
On Signaloid cores that track correlations (e.g., Signaloid core plus types), the UxHwDoubleGetIndependentCopy()
function creates and returns a copy of the input distribution value
that is stripped of all the correlation information, and consequently, is independent of all the distributions in the system. The returned distribution is independent from value
and from all other distributions in the system that value
was correlated with. This means that mathematical functions operating on value
and its independent copy are performed in an independent way.
Parameters
value
— The distributional value to strip all correlation information from.
Return Values
The UxHwDoubleGetIndependentCopy()
function returns a copy of the input distribution value
that is stripped of all the correlation information.
✏️ Examples
#include <stddef.h>
#include <stdio.h>
#include <uxhw.h>
int
main(void)
{
double value = UxHwDoubleGaussDist(0, 1);
double independentCopy = UxHwDoubleGetIndependentCopy(value);
printf("The value minus itself is the zero particle value: %lf\n", value - value);
printf("The value minus the independent copy is the difference between independent Gaussians: %lf\n", value - independentCopy);
return 0;
}