Vixen
caa30e12
csharp
public sealed class QueryResults

The working set of one query run: the points, their scores, and every factor behind them.

Read the guide page for this →

Remarks

⚠ Reused between runs rather than allocated per run, which is the difference between an environment query being affordable on a schedule and being a thing projects turn off. A query generating four hundred points over a dozen agents is a list of four hundred structs, cleared and refilled; a run that allocated would allocate that much per agent per interval.

The per-factor detail is optional and off unless Detailed is set. It is what the editor's preview table and the debug overlay read — why is this point worse than that one — and it is points × tests floats, which is exactly the cost nobody wants to pay in a shipped build.

Fields and properties (8)

  • public int Count

    How many points there are.

  • public ReadOnlySpan<ScoredQueryPoint> Points

    Every point, in the order the generators made them.

  • public int Factors

    How many factors each point recorded, or zero when nothing was recorded.

  • public bool Detailed

    Whether the per-factor detail is kept.

  • public Symbol Query

    Which query produced this.

  • public int Generated

    How many points a generator made before anything was filtered.

  • public int Surviving

    How many survived every filtering test.

  • public int Best

    The index of the best point, or -1 when nothing survived.

Methods (3)

  • public bool TryBest(out QueryPoint point)

    The best point, if there is one.

  • public ReadOnlySpan<float> DetailOf(int index)

    What one point's factors read, when the detail was kept.

  • public void Clear()

    Forgets everything, keeping the room it was in.

Used by (13)

  • EnvironmentQueryVixen.Ai
  • QueryContentTestsVixen.Ai.Tests
  • QueryPreviewVixen.Ai.Diagnostics
  • QueryPreviewTestsVixen.Ai.Diagnostics.Tests
  • QueryRunnerVixen.Ai.Nodes
  • QueryScorerExitCriteriaTestsVixen.Ai.Tests
  • QueryTestPurposeTestsVixen.Ai.Tests
  • RunQueryServiceVixen.Ai.Nodes
  • RunQueryTaskVixen.Ai.Nodes
  • WorldQueryTestsVixen.Ai.Nodes.Tests
  • QueryDocumentVixen.Editor.AssetEditors
  • QueryDocumentTestsVixen.Editor.AssetEditors.Tests
  • QueryViewVixen.Editor.AssetEditors