当前位置: 首页>>代码示例>>C#>>正文


C# Calabrese.FNode类代码示例

本文整理汇总了C#中Equus.Calabrese.FNode的典型用法代码示例。如果您正苦于以下问题:C# FNode类的具体用法?C# FNode怎么用?C# FNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


FNode类属于Equus.Calabrese命名空间,在下文中一共展示了FNode类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Generate

        public static FNode Generate(FNode Parent, Func<Cell[], Cell> Delegate, int Parameters, CellAffinity ReturnAffinity, string ToString)
        {

            CellFunction f = new CellFunction(ToString, Parameters, Delegate, ReturnAffinity, (x,y) => { return ToString; });
            return new FNodeResult(Parent, f);

        }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:FNodeResult.cs

示例2: FNodeDynamicRef

 public FNodeDynamicRef(FNode Parent, FNode Index, CellAffinity Affinity, Register MemoryRef)
     : base(Parent, FNodeAffinity.FieldRefNode)
 {
     this._idx = Index;
     this._affinity = Affinity;
     this._memory = MemoryRef;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:FNodeDynamicRef.cs

示例3: AggregateCount

 public AggregateCount(FNode M, Predicate F)
     : base(CellAffinity.INT)
 {
     this._Map = M;
     this._F = F;
     this._Sig = 1;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:AggregateCount.cs

示例4: AggregateFreq

 public AggregateFreq(FNode M, Predicate F, Predicate G)
     : base(CellAffinity.DOUBLE, F)
 {
     this._M = M;
     this._G = G;
     this._Sig = 2;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:AggregateFreq.cs

示例5: AggregateMin

 public AggregateMin(FNode M, Predicate F)
     : base(M.ReturnAffinity())
 {
     this._Map = M;
     this._F = F;
     this._Sig = 1;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:AggregateMin.cs

示例6: Compact

        // Compact all //
        public FNode Compact(FNode Node)
        {

            // Clone the current node //
            //FNode t = Node.CloneOfMe();

            this._Tocks = 1;
            while (this._Tocks != 0)
            {

                // Reset the tock variables //
                this._Tocks = 0;

                // Compact the leaf node; note that we may need to do this again //
                Node = CompactUnit(Node);

                // Accumulate the ticks //
                this._Ticks += this._Tocks;

                // Accumulate the cycles //
                this._Cycles++;

            }

            // return the compacted node //
            return Node;

        }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:29,代码来源:FNodeCompactor.cs

示例7: CompactCancleOut

        // A - A -> 0
        // A / A -> 1
        private FNode CompactCancleOut(FNode Node)
        {

            if (Node.Affinity != FNodeAffinity.ResultNode)
                return Node;

            FNodeResult x = (Node as FNodeResult);
            string name = x.InnerFunction.NameSig;

            // Check that the node is either - or / //
            if (name != FunctionNames.OP_SUB && name != FunctionNames.OP_DIV && name != FunctionNames.OP_DIV2)
                return Node;

            // Build an equality checker //
            IEqualityComparer<FNode> lne = new FNodeEquality();

            // Check if A == B //
            if (!lne.Equals(Node.Children[0], Node.Children[1]))
                return Node;

            // Check for A - A -> 0 //
            if (name == FunctionNames.OP_SUB)
                return new FNodeValue(Node.ParentNode, Cell.ZeroValue(CellAffinity.DOUBLE));

            // Check for A - A -> 0 //
            if (name == FunctionNames.OP_DIV || name == FunctionNames.OP_DIV2)
                return new FNodeValue(Node.ParentNode, Cell.OneValue(CellAffinity.DOUBLE));

            return Node;

        }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:33,代码来源:FNodeCompactor.cs

示例8: Equals

 public static Predicate Equals(FNode Left, FNode Right)
 {
     FNodeResult node = new FNodeResult(null, CellFunctionFactory.LookUp("=="));
     node.AddChildNode(Left);
     node.AddChildNode(Right);
     return new Predicate(node);
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:Predicate.cs

示例9: HParameter

 public HParameter(FNode Value)
 {
     this._affinity = HParameterAffinity.Expression;
     this._expression = Value;
     this._expression_set = new FNodeSet();
     this._expression_set.Add(Value); // in case a set of one was passed 
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:7,代码来源:HParameter.cs

示例10: FNodeHeapRef

 public FNodeHeapRef(FNode Parent, MemoryStruct Heap, int DirectRef, CellAffinity ReturnType)
     : base(Parent, FNodeAffinity.HeapRefNode)
 {
     this._Pointer = DirectRef;
     this._Heap = Heap;
     this._ReturnType = ReturnType;
     this._name = Heap.Scalars.Name(DirectRef);
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:8,代码来源:FNodeHeapRef.cs

示例11: Lambda

 // Constructor //
 public Lambda(string Name, FNode Expression, List<string> Parameters)
 {
     
     this._Expression = Expression;
     this._Name = Name;
     this._Pointers = Parameters;
     
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:9,代码来源:Lambda.cs

示例12: FNodeFieldRef

 public FNodeFieldRef(FNode Parent, int Index, CellAffinity Affinity, int FSize, Register MemoryRef)
     : base(Parent, FNodeAffinity.FieldRefNode)
 {
     this._idx = Index;
     this._affinity = Affinity;
     this._memory = MemoryRef;
     this._size = FSize;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:8,代码来源:FNodeFieldRef.cs

示例13: FNodePointer

 public FNodePointer(FNode Parent, string RefName, CellAffinity Type, int Size)
     : base(Parent, FNodeAffinity.PointerNode)
 {
     this._Type = Type;
     this._NameID = RefName;
     this._name = RefName;
     this._Size = Schema.FixSize(Type, Size);
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:8,代码来源:FNodePointer.cs

示例14: FNodeArrayDynamicRef

 public FNodeArrayDynamicRef(FNode Parent, FNode Row, FNode Col, MemoryStruct Heap, int DirectRef)
     : base(Parent, FNodeAffinity.MatrixRefNode)
 {
     this._RowIndex = Row;
     this._ColIndex = Col;
     this._DirectRef = DirectRef;
     this._Heap = Heap;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:8,代码来源:FNodeArrayDynamicRef.cs

示例15: FNode

 public FNode(FNode Parent, FNodeAffinity Affinity)
 {
     this._ParentNode = Parent;
     this._Affinity = Affinity;
     this._Cache = new List<FNode>();
     this._UID = Guid.NewGuid();
     this._name = null;
 }
开发者ID:pwdlugosz,项目名称:Horse,代码行数:8,代码来源:FNode.cs


注:本文中的Equus.Calabrese.FNode类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。