Changeset 7448 for branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs
- Timestamp:
- 02/03/12 18:22:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/GeneralizedQAP/HeuristicLab.Problems.Instances.QAPLIB/3.3/QAPLIBInstanceProvider.cs
r7445 r7448 29 29 namespace HeuristicLab.Problems.Instances.QAPLIB { 30 30 public class QAPLIBInstanceProvider : IProblemInstanceProvider<IQAPInstance> { 31 IProblemInstanceConsumer<IQAPInstance> consumer; 32 31 33 public string Name { 32 34 get { return "QAPLIB"; } … … 39 41 public Uri Link { 40 42 get { return new Uri("http://www.seas.upenn.edu/qaplib/"); } 43 } 44 45 public bool ConsumerCanBeFed { 46 get { return consumer != null; } 47 } 48 49 public void SetConsumer(IProblemInstanceConsumer consumer) { 50 if (consumer is IProblemInstanceConsumer<IQAPInstance>) 51 this.consumer = (IProblemInstanceConsumer<IQAPInstance>)consumer; 52 else this.consumer = null; 53 } 54 55 public void FeedConsumer(IInstanceDescriptor descriptor) { 56 consumer.LoadFrom(GetInstance(descriptor)); 41 57 } 42 58
Note: See TracChangeset
for help on using the changeset viewer.