Esempio n. 1
0
        public IEnumerable <OperationTable> GetSolutions()
        {
            int n = this.elements.Count;

            for (int k = 0; k < n; k++)
            {
                for (int j = 0; j < n; j++)
                {
                    if (this.cells[k, j] != null)
                    {
                        continue;
                    }

                    foreach (IElement element in this.elements)
                    {
                        OperationTable table = this.GetCompatibleTable(this.elements[k], this.elements[j], element);
                        if (table != null)
                        {
                            foreach (OperationTable solution in table.GetSolutions())
                            {
                                yield return(solution);
                            }
                        }
                    }

                    yield break;
                }
            }

            yield return(this);
        }