use of jcog.math.tensor.TensorFunc in project narchy by automenta.
the class TensorRL1 method noiseChip.
static void noiseChip(PhyWall p) {
{
final Random rng = new XoRoShiRo128PlusRandom(1);
final TensorFunc randomVector = Tensor.randomVectorGauss(16, 0, 1, rng);
final FloatRange lerpRate = new FloatRange(0.01f, 0, 1f);
final TensorLERP lerpVector = new TensorLERP(randomVector, lerpRate);
p.put(new Gridding(0.25f, // ),
new LabeledPane("rng", new AutoUpdateMatrixView(lerpVector.data)), new LabeledPane("lerp", new XYSlider().on((x, y) -> {
lerpRate.set(x);
})), new LabeledPane("out", new Port() {
@Override
public void prePaint(int dtMS) {
super.prePaint(dtMS);
lerpVector.update();
out(lerpVector.data);
}
})), 0.5f, 0.5f);
}
}
Aggregations