本文整理汇总了C#中Equus.Calabrese.FNode类的典型用法代码示例。如果您正苦于以下问题:C# FNode类的具体用法?C# FNode怎么用?C# FNode使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
FNode类属于Equus.Calabrese命名空间,在下文中一共展示了FNode类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: AggregateStat
public AggregateStat(FNode X, FNode W, Predicate F)
: base(X.ReturnAffinity())
{
this._MapX = X;
this._MapW = W;
this._F = F;
this._Sig = 3;
}
开发者ID:pwdlugosz,项目名称:Horse,代码行数:8,代码来源:AggregateStat.cs
示例17: TNodeAssignScalar
private int _AssignID; // 0 == assign, 1 == increment, 2 == decrement, 3 == auto increment, 4 == auto decrement
/// <summary>
/// Create an assignment action
/// </summary>
/// <param name="Parent">Parent node</param>
/// <param name="Heap">The memory heap to work off of</param>
/// <param name="Index">The direct location of the variable in the heap</param>
/// <param name="Map">The expression to assign to</param>
/// <param name="AssignID">0 == assign, 1 == increment, 2 == decrement, 3 == auto increment, 4 == auto decrement</param>
public TNodeAssignScalar(TNode Parent, MemoryStruct Heap, int Index, FNode Map, int AssignID)
: base(Parent)
{
this._Heap = Heap;
this._Mapping = Map;
this._Index = Index;
this._AssignID = AssignID;
}
开发者ID:pwdlugosz,项目名称:Horse,代码行数:18,代码来源:TNodeAssignScalar.cs
示例18: TNodeMatrixUnitAssign
private int _AssignID; // 0 == assign, 1 == increment, 2 == decrement, 3 == auto increment, 4 == auto decrement
public TNodeMatrixUnitAssign(TNode Parent, CellMatrix Data, FNode Node, FNode RowID, FNode ColumnID, int AssignID)
: base(Parent)
{
this._matrix = Data;
this._Node = Node;
this._AssignID = AssignID;
this._row_id = RowID;
this._col_id = ColumnID;
}
开发者ID:pwdlugosz,项目名称:Horse,代码行数:11,代码来源:TNodeMatrixUnitAssign.cs
示例19: CompactUnit
private FNode CompactUnit(FNode Node)
{
for (int i = 0; i < Node.Children.Count; i++)
Node.Children[i] = CompactUnit(Node.Children[i]);
return CompactSingle(Node);
}
开发者ID:pwdlugosz,项目名称:Horse,代码行数:9,代码来源:FNodeCompactor.cs
示例20: GeneralizedLinearModel
public GeneralizedLinearModel(string Name, DataSet Data, Predicate Where, FNode Expected, FNodeSet Actual, FNode Weight, Lambda LinkFunction)
: base(Name, Data, Where, Expected, Actual, Weight)
{
int val = IsCorrectLink(LinkFunction);
if (val == -1)
throw new Exception("Link function must have exactly one argument");
else if (val == -2)
throw new Exception("Link function is not differentiable");
this._Link = LinkFunction;
}
开发者ID:pwdlugosz,项目名称:Horse,代码行数:12,代码来源:GeneralizedLinearModel.cs
注:本文中的Equus.Calabrese.FNode类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论