本文整理汇总了C#中MathIdentifier类的典型用法代码示例。如果您正苦于以下问题:C# MathIdentifier类的具体用法?C# MathIdentifier怎么用?C# MathIdentifier使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
MathIdentifier类属于命名空间,在下文中一共展示了MathIdentifier类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: RegisterTheorems
public static void RegisterTheorems(ILibrary library)
{
Analysis.DerivativeTransformation.Provider.Add(
new Analysis.DerivativeTransformation(_entityId,
delegate(Port port, SignalSet manipulatedInputs, Signal variable, bool hasManipulatedInputs)
{
ReadOnlySignalSet squares = StdBuilder.Square(port.OutputSignals);
Signal one = IntegerValue.ConstantOne;
SignalSet outputs = new SignalSet();
for(int i = 0; i < manipulatedInputs.Count; i++)
outputs.Add((one + squares[i]) * manipulatedInputs[i]);
return outputs;
}));
MathIdentifier typeId = new MathIdentifier("TrigonometricSubstitute", "Std");
ITheoremProvider basicProvider;
if(!library.TryLookupTheoremType(typeId, out basicProvider))
{
basicProvider = Binder.GetInstance<ITransformationTheoremProvider, MathIdentifier>(typeId);
library.AddTheoremType(basicProvider);
}
((ITransformationTheoremProvider)basicProvider).Add(
new BasicTransformation(_entityId.DerivePostfix("TrigonometricSubstitute"), typeId,
delegate() { return new Pattern(new EntityCondition(_entityId)); },
delegate(Port port) { return ManipulationPlan.DoAlter; },
delegate(Port port, SignalSet transformedInputs, bool hasTransformedInputs)
{
Signal[] ret = new Signal[transformedInputs.Count];
for(int i = 0; i < ret.Length; i++)
ret[i] = StdBuilder.Sine(transformedInputs[i]) / StdBuilder.Cosine(transformedInputs[i]);
return ret;
}));
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:33,代码来源:TangentArchitectures.cs
示例2: RegisterTheorems
public static void RegisterTheorems(ILibrary library)
{
Analysis.DerivativeTransformation.Provider.Add(
new Analysis.DerivativeTransformation(_entityId,
delegate(Port port, SignalSet manipulatedInputs, Signal variable, bool hasManipulatedInputs)
{
Signal[] outputs = new Signal[manipulatedInputs.Count];
ReadOnlySignalSet cotangents = StdBuilder.Cotangent(port.InputSignals);
for(int i = 0; i < outputs.Length; i++)
outputs[i] = Std.Multiply(port.OutputSignals[i], cotangents[i], manipulatedInputs[i]);
return StdBuilder.Negate(outputs);
}));
MathIdentifier typeId = new MathIdentifier("TrigonometricSubstitute", "Std");
ITheoremProvider basicProvider;
if(!library.TryLookupTheoremType(typeId, out basicProvider))
{
basicProvider = Binder.GetInstance<ITransformationTheoremProvider, MathIdentifier>(typeId);
library.AddTheoremType(basicProvider);
}
((ITransformationTheoremProvider)basicProvider).Add(
new BasicTransformation(_entityId.DerivePostfix("TrigonometricSubstitute"), typeId,
delegate() { return new Pattern(new EntityCondition(_entityId)); },
delegate(Port port) { return ManipulationPlan.DoAlter; },
delegate(Port port, SignalSet transformedInputs, bool hasTransformedInputs)
{
return StdBuilder.Invert(StdBuilder.Sine(transformedInputs));
//Signal[] ret = new Signal[transformedInputs.Count];
//for(int i = 0; i < ret.Length; i++)
// ret[i] = Std.Invert(Std.Sine(transformedInputs[i]));
//return ret;
}));
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:33,代码来源:CosecantArchitectures.cs
示例3: MergeToCoalescedTree
public virtual void MergeToCoalescedTree(MathIdentifier patternId, List<CoalescedTreeNode> parents)
{
List<CoalescedTreeNode> nodes = _condition.MergeToCoalescedTree(parents);
MergeGroupToCoalescedTree(patternId, nodes);
foreach(CoalescedTreeNode node in nodes)
node.Subscribe(patternId);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:7,代码来源:Pattern.cs
示例4: NewPortCommand
protected NewPortCommand(SerializationInfo info, StreamingContext context)
: base(info, context)
{
_entityId = MathIdentifier.Parse(info.GetString("entityId"));
_inputCnt = info.GetInt32("inputCount");
_busCnt = info.GetInt32("busCount");
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:NewPortCommand.cs
示例5: DerivativeTransformation
public DerivativeTransformation(MathIdentifier id, MathIdentifier supportedEntityId, EstimateDerivePlan plan, Derive derive)
{
_id = id;
_supportedEntityId = supportedEntityId;
_derive = derive;
_plan = plan;
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:7,代码来源:DerivativeTransformation.cs
示例6: AutoSimplifyTransformation
public AutoSimplifyTransformation(MathIdentifier id, CreatePattern pattern, EstimatePlan plan, ManipulatePort simplify)
{
_id = id;
_pattern = pattern;
_simplify = simplify;
_plan = plan;
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:7,代码来源:AutoSimplifyTransformation.cs
示例7: AutoSimplifyTransformation
public AutoSimplifyTransformation(MathIdentifier id, Predicate<Port> supportsPort, EstimatePlan plan, ManipulatePort simplify)
{
_id = id;
_supportsPort = supportsPort;
_simplify = simplify;
_plan = plan;
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:7,代码来源:AutoSimplifyTransformation.cs
示例8: GenericPropagationTheorem
public GenericPropagationTheorem(MathIdentifier id, MathIdentifier providedPropertyId, ImpliesProperty impliesProperty, BuildProperty buildProperty)
{
this.id = id;
this.providedPropertyId = providedPropertyId;
this.impliesProperty = impliesProperty;
this.buildProperty = buildProperty;
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:7,代码来源:GenericPropagationTheorem.cs
示例9: ConversionDistance
public ConversionDistance(MathIdentifier canConvertFrom, int cost, bool lossless, ConversionRouter nextHop, Converter<ValueStructure, ValueStructure> convert)
{
this.CanConvertFrom = canConvertFrom;
this.Cost = cost;
this.Lossless = lossless;
this.NextHop = nextHop;
this.Convert = convert;
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:8,代码来源:ConversionRouter.cs
示例10: ConversionRouter
public ConversionRouter(MathIdentifier structureId)
{
this.structureId = structureId;
this.losslessNeighbors = new Dictionary<MathIdentifier, ConversionRoute>();
this.lossyNeighbors = new Dictionary<MathIdentifier, ConversionRoute>();
this.targetNeighbors = new Dictionary<MathIdentifier, ConversionRouter>();
this.vector = new Dictionary<MathIdentifier, ConversionDistance>();
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:8,代码来源:ConversionRouter.cs
示例11: BasicTransformation
public BasicTransformation(MathIdentifier id, MathIdentifier transformationTypeId, Predicate<Port> supportsPort, EstimatePlan plan, ManipulatePort transform)
{
_id = id;
_transformationTypeId = transformationTypeId;
_supportsPort = supportsPort;
_transform = transform;
_plan = plan;
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:8,代码来源:BasicTransformation.cs
示例12: AddEntity
private List<IArchitectureFactory> AddEntity(MathIdentifier entityId)
{
List<IArchitectureFactory> value;
if(!_table.TryGetValue(entityId, out value))
{
value = new List<IArchitectureFactory>();
_table.Add(entityId, value);
}
return value;
}
开发者ID:xuchuansheng,项目名称:GenXSource,代码行数:10,代码来源:ArchitectureTable.cs
示例13: GenericMathOpArchitecture
/// <summary>Port Instance Constructor</summary>
protected GenericMathOpArchitecture(MathIdentifier id, MathIdentifier entityId, Port port)
: base(id, entityId, true)
{
if(port == null) throw new ArgumentNullException("port");
//System.Diagnostics.Debug.Assert(SupportsPort(port));
SetPort(port);
for(int i = 0; i < port.OutputSignalCount; i++)
port.OutputSignals[i].PostNewValue(UndefinedSymbol.Instance);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:11,代码来源:GenericMathOpArchitecture.cs
示例14: GenericSimpleArchitecture
/// <summary>Port Instance Constructor</summary>
protected GenericSimpleArchitecture(MathIdentifier entityId, bool isMathematicalOperator, Port port, int internalSignalCount)
: base(entityId, entityId, isMathematicalOperator)
{
_internalSignals = new Signal[internalSignalCount];
for(int i = 0; i < _internalSignals.Length; i++)
_internalSignals[i] = Binder.CreateSignal();
//System.Diagnostics.Debug.Assert(SupportsPort(port));
SetPort(port);
_sensedSignals = new SignalSet();
SenseSignals(port.InputSignals, _internalSignals, port.Buses, port.OutputSignals);
Action(port.InputSignals, port.OutputSignals, _internalSignals, port.Buses);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:14,代码来源:GenericSimpleArchitecture.cs
示例15: CompoundArchitecture
public CompoundArchitecture(MathIdentifier id, MathIdentifier entityId, Port port, IMathSystem system)
: base(id, entityId, false)
{
this.inputSignals = port.InputSignals;
this.outputSignals = port.OutputSignals;
this.system = system;
this.system.OutputValueChanged += system_OutputValueChanged;
SetPort(port);
for(int i = 0; i < inputSignals.Count; i++)
inputSignals[i].ValueChanged += CompoundArchitecture_SignalValueChanged;
system.PushInputValueRange(inputSignals);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:14,代码来源:CompoundArchitecture.cs
示例16: GenericArchitecture
public GenericArchitecture(MathIdentifier id, MathIdentifier entityId, bool isMathematicalOperator, Port port, Predicate<Port> portSupport, int internalSignalCount, params ProcessBase[] processes)
: base(id, entityId, isMathematicalOperator)
{
_processes = processes;
_portSupport = portSupport;
_internalSignals = new Signal[internalSignalCount];
for(int i = 0; i < _internalSignals.Length; i++)
_internalSignals[i] = Binder.CreateSignal();
//System.Diagnostics.Debug.Assert(SupportsPort(port));
SetPort(port);
for(int i = 0; i < processes.Length; i++)
processes[i].Register(port.InputSignals, port.OutputSignals, _internalSignals, port.Buses);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:15,代码来源:GenericArchitecture.cs
示例17: AddGroup
public void AddGroup(MathIdentifier patternId, string label)
{
_groupAxis.Add(patternId, label);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:4,代码来源:CoalescedTreeNode.cs
示例18: Unsubscribe
public void Unsubscribe(MathIdentifier patternId)
{
_subscriptionAxis.Remove(patternId);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:4,代码来源:CoalescedTreeNode.cs
示例19: Subscribe
public void Subscribe(MathIdentifier patternId)
{
_subscriptionAxis.Add(patternId);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:4,代码来源:CoalescedTreeNode.cs
示例20: RemoveGroup
public void RemoveGroup(MathIdentifier patternId)
{
_groupAxis.Remove(patternId);
}
开发者ID:JackWangCUMT,项目名称:mathnet-yttrium,代码行数:4,代码来源:CoalescedTreeNode.cs
注:本文中的MathIdentifier类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论