Beispiel #1
0
        public string Print()
        {
            StringBuilder sb = new StringBuilder();

            switch (Type)
            {
            case FactorType.Constant:
                sb.Append(ConstantValue.ToString());
                break;

            case FactorType.SimilarityMetric:
                sb.Append(SimilarityMetric.GetType().Name);
                break;

            case FactorType.Expression:
                sb.Append("(");
                sb.Append(Expression.Print());
                sb.Append(")");
                break;

            case FactorType.Function:
                sb.Append(FunctionType.ToString());
                break;
            }
            return(sb.ToString());
        }