• Parameters

    • solverParams: {
          constraints: {
              taco_taco: TacoTacoConstraint[];
              taco_tortilla: TacoTortillaConstraint[];
              tortilla_tortilla: TortillaTortillaConstraint[];
              transitivity: TransitivityConstraint[];
          };
          facePairs: string[];
          lookup: {
              taco_taco: number[][];
              taco_tortilla: number[][];
              tortilla_tortilla: number[][];
              transitivity: number[][];
          };
          orders: {
              [key: string]: number;
          };
      }

      the parameters for the solver which include:

      • constraints for each taco/tortilla type, an array of each condition, each condition being an array of all faces involved.
      • lookup for each taco/tortilla type, a reverse lookup table where each face-pair contains an array of all constraints its involved in
      • facePairs an array of space-separated face pair strings
      • orders a prelimiary solution to some of the facePairs with solutions in 1,2 value encoding. Useful for any pre-calculations, for example, pre-calculating edge-adjacent face pairs with known assignments.

    Returns {
        branches: {
            [key: string]: number;
        }[][];
        root: {
            [key: string]: number;
        };
    }

    a set of solutions where keys are space-separated face pair strings, and values are 1 or 2 describing the relationship of the two faces. Results are stored in "root" and "branches", to compile a complete solution, append the "root" to one selection from each array in "branches".

    • branches: {
          [key: string]: number;
      }[][]
    • root: {
          [key: string]: number;
      }
      • [key: string]: number

    Description

    Recursively calculate all layer order solutions between faces in a flat-folded FOLD graph.