示例#1
0
        private static IEnumerable <Valor> ListarUnariosBase()
        {
            var original = new Valor(1, 4, HistoricoOperacao.Vazio()).FormatterPuro(false);

            if (Operacoes.Raiz)
            {
                yield return(new Valor(1, 2, HistoricoOperacao.OperacaoUnaria()).FormatterRaiz(original, false));

                yield return(new Valor(1, -2, HistoricoOperacao.OperacaoUnaria()).FormatterRaiz(original, true));
            }

            yield return(original);

            yield return(new Valor(1, -4, HistoricoOperacao.Vazio()).FormatterPuro(true));

            if (Operacoes.Terminal)
            {
                yield return(new Valor(1, 10, HistoricoOperacao.OperacaoUnaria()).FormatterTermial(original, false));

                yield return(new Valor(1, -10, HistoricoOperacao.OperacaoUnaria()).FormatterTermial(original, true));
            }

            if (Operacoes.Fatorial)
            {
                yield return(new Valor(1, 24, HistoricoOperacao.OperacaoUnaria()).FormatterFatorial(original, false));

                yield return(new Valor(1, -24, HistoricoOperacao.OperacaoUnaria()).FormatterFatorial(original, true));
            }
        }
示例#2
0
        private static IEnumerable <Valor> ListarQuaternarioBase()
        {
            var original = new Valor(4, 4444, HistoricoOperacao.Vazio()).FormatterPuro(false);

            //if (Operacoes.Raiz)
            //{
            //    yield return new Valor(4, Math.Sqrt(4444), 1).FormatterRaiz(original, false);
            //    yield return new Valor(4, -Math.Sqrt(4444), 1).FormatterRaiz(original, true);
            //}

            yield return(original);

            yield return(new Valor(4, -4444, HistoricoOperacao.Vazio()).FormatterPuro(true));

            if (Operacoes.Terminal)
            {
                yield return(new Valor(4, Dicionarios.TermialHashSet[4444], HistoricoOperacao.OperacaoUnaria()).FormatterTermial(original, false));

                yield return(new Valor(4, -Dicionarios.TermialHashSet[4444], HistoricoOperacao.OperacaoUnaria()).FormatterTermial(original, true));
            }
        }