Ejemplo n.º 1
0
        protected ExtendedFormulaCreator(IVariableDetector detector)
            : base(detector, false)
        {
            opDetectors = new IOperationDetector[]
            { new OneVariableFunctionDetector(detector), new ExtendedOperationDetector(detector, this) //,
              /*!!! new Func.FuncDetector(detector) */ };
            ElementaryBinaryDetector plus = new ElementaryBinaryDetector('+');

            plus.Add(StringConcatOperation.Object);
            /// Has higher priority than other '+'-type operators, causes a bug
            plus.Add(StringObjectConcatOperation.Object);
            LikeOperation like = new LikeOperation();

            like.Add(LikeObjectOperation.Object);
            detectors = new IBinaryDetector[]
            {
                new LogicalDetector('\u2217'), new LogicalDetector('\u2216'), new LogicalDetector('\u8835'),
                LogicalEqualityDetector.Object,
                new BitDetector('|'), new BitDetector('&'), new BitDetector('^'),
                new BitDetector('\u2266'), new BitDetector('\u2267'),
                ComparationDetector.Object, like, RealMatrixBinary.Singleton,
                RealVectorBinary.Singleton,
                plus, new ElementaryBinaryDetector('-'),
                RealMatrixMultiplication.Singleton,
                new ElementaryBinaryDetector('*'),
                new ElementaryDivisionDetector('/'),
                new ElementaryDivisionDetector('﹪'),
                Vector3DProduct.Object,
                WhereDetector.Singleton,
                OrderByDetector.Singleton,
                AverageDetector.Singleton
            };
        }
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="init">Initialization sign</param>
        protected ElementaryFunctionsCreator(bool init)
        {
            if (!init)
            {
                return;
            }
            ElementaryBinaryDetector plus = new ElementaryBinaryDetector('+');

            plus.Add(StringConcatOperation.Object);
            //!!! Has priority higher than needed '+'-type operations, throws a bug
            plus.Add(StringObjectConcatOperation.Object);
            LikeOperation like = new LikeOperation();

            like.Add(LikeObjectOperation.Object);

            detectors = new IBinaryDetector[]
            {
                new LogicalDetector('\u2217'), new LogicalDetector('\u2216'),
                new LogicalDetector('\u8835'),
                LogicalEqualityDetector.Object,
                new BitDetector('|'), new BitDetector('&'), new BitDetector('^'),
                new BitDetector('\u2266'), new BitDetector('\u2267'),
                ComparationDetector.Object, like,
                plus, new ElementaryBinaryDetector('-'),
                new ElementaryBinaryDetector('*'),
                new ElementaryDivisionDetector('﹪'),
                new ElementaryDivisionDetector('/'),
                WhereDetector.Singleton, OrderByDetector.Singleton, AverageDetector.Singleton,
                IndexOfDetector.Singleton
            };
        }
Ejemplo n.º 3
0
 object IObjectOperation.this[object[] x]
 {
     get { return(LikeOperation.Like(x[0], x[1])); }
 }