Skip to content

Sandbox

Sandbox Class

Top-level functions of the sandbox-core kernel.

public static class Sandbox

Inheritance System.Object → Sandbox

Methods

Sandbox.GetStats(double[]) Method

Compute count/min/max/mean over values.

public static Infrared.Sandbox.CsBindgen.Stats GetStats(double[] values);

Parameters

values System.Double[]

The values to summarize.

Returns

Stats
A Stats summary.

Exceptions

SandboxException
If values is empty.

Sandbox.Greet(string) Method

Return a friendly greeting for name.

public static string Greet(string name);

Parameters

name System.String

The name to greet.

Returns

System.String
The greeting string.

Sandbox.PackF32(float[]) Method

Pack an array of floats into little-endian f32 bytes.

public static byte[] PackF32(float[] values);

Parameters

values System.Single[]

The floats to pack.

Returns

System.Byte[]
The packed little-endian bytes.

Sandbox.Scale(double[], double) Method

Multiply every element of values by factor.

public static double[] Scale(double[] values, double factor);

Parameters

values System.Double[]

The values to scale.

factor System.Double

The multiplier.

Returns

System.Double[]
A new array of scaled values.

Sandbox.UnpackF32(byte[]) Method

Unpack little-endian f32 bytes back into an array of floats.

public static float[] UnpackF32(byte[] bytes);

Parameters

bytes System.Byte[]

The little-endian bytes to unpack.

Returns

System.Single[]
The unpacked floats.

Exceptions

SandboxException
If the byte length is not a multiple of 4.