SparseWeight8.Create

Create(params float[])

Creates a new SparseWeight8 from a weights collection. If there’s more than 8 non zero values, the 8 most representative values are taken.

public static SparseWeight8 Create(params float[] weights)
ParameterTypeDescription
weightsSingle[]A sequence of weight values.

Return Value

A SparseWeight8 instance.

See Also


Create(IEnumerable<float>)

Creates a new SparseWeight8 from a weights collection. If there’s more than 8 weighted values, the 8 heaviest values are taken.

public static SparseWeight8 Create(IEnumerable<float> weights)
ParameterTypeDescription
weightsIEnumerable`1A sequence of weight values.

Return Value

A SparseWeight8 instance.

See Also


Create(params (int Index, float Weight)[])

Creates a new SparseWeight8 from an indexed weight collection. If there’s more than 8 weighted values, the 8 heaviest values are taken.

public static SparseWeight8 Create(params (int Index, float Weight)[] indexedWeights)
ParameterTypeDescription
indexedWeightsValueTuple`2[]A sequence of indexed weight pairs.

Return Value

A SparseWeight8 instance.

See Also


Create(IEnumerable<(int Index, float Weight)>)

Creates a new SparseWeight8 from an indexed weight collection. If there’s more than 8 weighted values, the 8 heaviest values are taken.

public static SparseWeight8 Create(IEnumerable<(int Index, float Weight)> indexedWeights)
ParameterTypeDescription
indexedWeightsIEnumerable`1A sequence of indexed weight pairs.

Return Value

A SparseWeight8 instance.

See Also


Create(ref Vector4, ref Vector4)

Creates a new SparseWeight8 struct.

public static SparseWeight8 Create(ref Vector4 idx0123, ref Vector4 wgt0123)
ParameterTypeDescription
idx0123Vector4&The indices of weights 0 to 3.
wgt0123Vector4&The weights of indices 0 to 3.

Return Value

A SparseWeight8 instance.

Remarks

Repeating indices will have their weights merged.

See Also


Create(ref Vector4, ref Vector4, ref Vector4, ref Vector4)

Creates a new SparseWeight8 struct.

public static SparseWeight8 Create(ref Vector4 idx0123, ref Vector4 idx4567, ref Vector4 wgt0123, 
    ref Vector4 wgt4567)
ParameterTypeDescription
idx0123Vector4&The first 4 indices.
idx4567Vector4&The next 4 indices.
wgt0123Vector4&The first 4 weights.
wgt4567Vector4&The next 4 weights.

Return Value

A SparseWeight8 instance.

Remarks

Repeating indices will have their weights merged.

See Also