public IArchitectureFactory LookupArchitecture(Port port) { ReadOnlyCollection <IArchitectureFactory> entry = archTable.LookupEntity(port.Entity); for (int i = 0; i < entry.Count; i++) { IArchitectureFactory factory = entry[i]; if (factory.SupportsPort(port)) { return(factory); } } throw new MathNet.Symbolics.Backend.Exceptions.ArchitectureNotAvailableException(port); }
public bool ContainsArchitecture(Port port) { if (!archTable.ContainsEntity(port.Entity)) { return(false); } ReadOnlyCollection <IArchitectureFactory> entry = archTable.LookupEntity(port.Entity); for (int i = 0; i < entry.Count; i++) { IArchitectureFactory factory = entry[i]; if (factory.SupportsPort(port)) { return(true); } } return(false); }