本文整理汇总了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);
}
示例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;
}
示例3: AggregateCount
public AggregateCount(FNode M, Predicate F)
: base(CellAffinity.INT)
{
this._Map = M;
this._F = F;
this._Sig = 1;
}
示例4: AggregateFreq
public AggregateFreq(FNode M, Predicate F, Predicate G)
: base(CellAffinity.DOUBLE, F)
{
this._M = M;
this._G = G;
this._Sig = 2;
}
示例5: AggregateMin
public AggregateMin(FNode M, Predicate F)
: base(M.ReturnAffinity())
{
this._Map = M;
this._F = F;
this._Sig = 1;
}
示例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;
}
示例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;
}
示例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);
}
示例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
}
示例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);
}
示例11: Lambda
// Constructor //
public Lambda(string Name, FNode Expression, List<string> Parameters)
{
this._Expression = Expression;
this._Name = Name;
this._Pointers = Parameters;
}
示例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;
}
示例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);
}
示例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;
}
示例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;
}