本文整理汇总了C#中MathIdentifier.ToString方法的典型用法代码示例。如果您正苦于以下问题:C# MathIdentifier.ToString方法的具体用法?C# MathIdentifier.ToString怎么用?C# MathIdentifier.ToString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MathIdentifier
的用法示例。
在下文中一共展示了MathIdentifier.ToString方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: BuildPort
public Guid BuildPort(MathIdentifier entityId, InstanceIdSet inputSignals, InstanceIdSet outputSignals, InstanceIdSet buses)
{
_fsm.AdvanceTo(BuilderState.Ports);
Guid guid = Guid.NewGuid();
_writer.WriteStartElement("Port", Config.YttriumNamespace);
_writer.WriteAttributeString("iid", guid.ToString());
_writer.WriteAttributeString("entityId", entityId.ToString());
_writer.WriteStartElement("InputSignals", Config.YttriumNamespace);
foreach(Guid id in inputSignals)
_writer.WriteElementString("SignalRef", Config.YttriumNamespace, id.ToString());
_writer.WriteEndElement();
_writer.WriteStartElement("OutputSignals", Config.YttriumNamespace);
foreach(Guid id in outputSignals)
_writer.WriteElementString("SignalRef", Config.YttriumNamespace, id.ToString());
_writer.WriteEndElement();
_writer.WriteStartElement("Buses", Config.YttriumNamespace);
foreach(Guid id in buses)
_writer.WriteElementString("BusRef", Config.YttriumNamespace, id.ToString());
_writer.WriteEndElement();
_writer.WriteEndElement();
return guid;
}
示例2: BuildConverterFrom
public Converter<object, object> BuildConverterFrom(MathIdentifier id)
{
if(structureId.Equals(id))
return delegate(object value) { return value; };
IRouteDistance cd;
if(vector.TryGetValue(id, out cd))
return cd.Convert;
throw new NotSupportedException("no route available to convert from " + id.ToString());
//throw new MathNet.Symbolics.Backend.Exceptions.IncompatibleStructureException(id.Label, id.Domain);
}
示例3: BuildPort
public Guid BuildPort(MathIdentifier entityId, InstanceIdSet inputSignals, InstanceIdSet outputSignals, InstanceIdSet buses)
{
Guid guid = Guid.NewGuid();
_current.AppendFormat("instanciate {0}", entityId.ToString());
if(inputSignals.Count > 0)
{
_current.Append(" in ");
for(int i = 0; i < inputSignals.Count; i++)
{
if(i > 0) _current.Append(',');
_current.Append(_signalMappings[inputSignals[i]]);
}
}
if(outputSignals.Count > 0)
{
_current.Append(" out ");
for(int i = 0; i < outputSignals.Count; i++)
{
if(i > 0) _current.Append(',');
_current.Append(_signalMappings[outputSignals[i]]);
}
}
if(buses.Count > 0)
{
_current.Append(" bus ");
for(int i = 0; i < buses.Count; i++)
{
if(i > 0) _current.Append(',');
_current.Append(_busMappings[buses[i]]);
}
}
_current.AppendLine(";");
return guid;
}