Exemplo n.º 1
0
        private string htmlTableRowDistribution(SignMatrix matrix, IEnumerable <SignMatrix> relatedMatrices)
        {
            string result = "<tr style=\"border: 2px solid black;>\">";

            result += "<td style=\"border: 1px solid black;>\">";
            result += matrix.ToHtml();
            result += "</td>";
            foreach (SignMatrix relatedMatrix in relatedMatrices)
            {
                result += "<td style=\"border: 1px solid black;\">";
                result += "<p>" + matrixMap[matrix][relatedMatrix] + relatedMatrix.ToHtml() + "</p>";
                result += "</td>";
            }

            result += "<td style=\"border: 1px solid black;>\">";
            result += "<p>" + matrixMap[matrix].Values.Sum() + "</p>";
            result += "</td>";

            result += "</tr>\n";
            return(result);
        }
Exemplo n.º 2
0
        private string htmlTableRowPermutations(SignMatrix matrix)
        {
            string result = "<tr style=\"border: 2px solid black;>\">";

            result += "<td style=\"border: 1px solid black;>\">";
            result += matrix.ToHtml();
            result += "</td>";

            List <NgonEdgePermutations> permutations = new List <NgonEdgePermutations>();

            foreach (Ngon ngon in similarFullMatrix[matrix])
            {
                permutations.Add(new NgonEdgePermutations(ngon));
            }

            result += "<td style=\"border: 1px solid black;\">";
            foreach (NgonEdgePermutations permutation in permutations)
            {
                result += "<p>" + permutation.convex + "</p>";
            }
            result += "</td>";

            result += "<td style=\"border: 1px solid black;>\">";
            foreach (NgonEdgePermutations permutation in permutations)
            {
                result += "<p>" + permutation.reflex + "</p>";
            }
            result += "</td>";

            result += "<td style=\"border: 1px solid black;>\">";
            foreach (NgonEdgePermutations permutation in permutations)
            {
                result += "<p>" + permutation.self_intersecting + "</p>";
            }
            result += "</td>";

            result += "</tr>\n";
            return(result);
        }