Skip to content

TraitOdds

Namespace Nfty.Core.Stats in assembly Nfty.Core.

public record TraitOdds

One variant's odds, both within its recipe and across the whole collection.

Constructors

TraitOdds(string, string, string, string, string, string, double, double, TraitRowKind)

public TraitOdds(string RecipeId, string RecipeName, string IngredientId, string IngredientName, string VariantId, string VariantName, double WithinRecipePercent, double OverallPercent, TraitRowKind Kind = TraitRowKind.Variant);

Parameters

  • RecipeId (string) - The owning recipe's id.
  • RecipeName (string) - The owning recipe's name.
  • IngredientId (string) - The layer's id.
  • IngredientName (string) - The layer's name.
  • VariantId (string) - The variant's id.
  • VariantName (string) - The variant's name.
  • WithinRecipePercent (double) - Share among that recipe's mints.
  • OverallPercent (double) - Share of the whole collection — the recipe's own share folded in.
  • Kind (TraitRowKind) - Whether the row is a variant, a color name or the layer being absent. For a color row IngredientName is the published trait type (Body Color) and the variant id and name are both the color name; for an absent row both are None. Anything keyed by a real variant id must filter on TraitRowKind.Variant.

Properties

IngredientId

public string IngredientId { get; init; }

The layer's id.

IngredientName

public string IngredientName { get; init; }

The layer's name.

Kind

public TraitRowKind Kind { get; init; }

Whether the row is a variant, a color name or the layer being absent. For a color row IngredientName is the published trait type (Body Color) and the variant id and name are both the color name; for an absent row both are None. Anything keyed by a real variant id must filter on TraitRowKind.Variant.

OverallPercent

public double OverallPercent { get; init; }

Share of the whole collection — the recipe's own share folded in.

RecipeId

public string RecipeId { get; init; }

The owning recipe's id.

RecipeName

public string RecipeName { get; init; }

The owning recipe's name.

VariantId

public string VariantId { get; init; }

The variant's id.

VariantName

public string VariantName { get; init; }

The variant's name.

WithinRecipePercent

public double WithinRecipePercent { get; init; }

Share among that recipe's mints.