/// <summary> /// Determines whether a (x,y,z) triarc with given faceSizes exists (active boundary is never greater than 63) /// and exports graph to grafy folder. /// </summary> /// <param name="x">First number that determines triarc.</param> /// <param name="y">Second number that determines triarc.</param> /// <param name="z">Third number that determines triarc.</param> /// <param name="facesSizes">Allowed sizes of faces for triarc.</param> /// <param name="limit">Number of states to find befor giving up.</param> /// <returns></returns> public static bool DoesTriarcExist(int x, int y, int z, IList <int> facesSizes, int limit) { var solving = new TriarcSolving(x, y, z, facesSizes.ToArray()); solving.TransitionLimit = limit; return(solving.SolveTriarc() != null); }
public RingSolving(int a, int b, int[] facesSizes, int limit) { var solving = new TriarcSolving(CreateOuterBoundaryOfBiarc(a, b), facesSizes); solving.TransitionLimit = limit; this.ring = solving.SolveTriarc(); }
/// <summary> /// Determines whether a (x,y,z) triarc with given faceSizes exists (active boundary is never greater than 63) /// and exports graph to grafy folder. /// </summary> /// <param name="x">First number that determines triarc.</param> /// <param name="y">Second number that determines triarc.</param> /// <param name="z">Third number that determines triarc.</param> /// <param name="facesSizes">Allowed sizes of faces for triarc.</param> /// <returns>True if such triarc exist with activ boundary of maximum length 63.</returns> public static bool FindAndBuildTriarc(int x, int y, int z, List <int> facesSizes, string path = "") { var triarcGraph = new TriarcGraph(x, y, z, facesSizes); var solving = new TriarcSolving(x, y, z, facesSizes.ToArray()); var reconstruction = new TriarcReconstruction(triarcGraph, solving.SolveTriarc(), path); return(reconstruction.ReconstructTriarc()); }
public static bool DoesGeneralBoundaryExistAndConstruct(long boundary, List <int> facesSizes, string path = "") { var solving = new TriarcSolving(boundary.BoundaryToStandardizedForm(), facesSizes.ToArray()); if (solving.SolveTriarc() != null) { var triarcGraph = new ArcGraph(boundary.BoundaryToStandardizedForm(), Convert.ToString(boundary, 16) + "{" + string.Join <string>(",", facesSizes.Select(i => i.ToString())) + "}", facesSizes); var reconstruction = new TriarcReconstruction(triarcGraph, solving.SolveTriarc(), path); reconstruction.ReconstructTriarc(); return(true); } return(false); }
public static bool DoesGeneralBoundaryExist(long boundary, List <int> facesSizes) { var solving = new TriarcSolving(boundary.BoundaryToStandardizedForm(), facesSizes.ToArray()); return(solving.SolveTriarc() != null); }