Peter Kurfer
d8d307545f
- Added Benchmarks - Added Nuke build - Refactored directory structure - Generated GitHub Actions config from Nuke - Added tool to handle benchmarking from Nuke
17 lines
No EOL
515 B
C#
17 lines
No EOL
515 B
C#
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Tand.Core.Api;
|
|
|
|
namespace Tand.Core.Benchmarks
|
|
{
|
|
public interface IRationalsProvider
|
|
{
|
|
[Tand(typeof(ExecutionTimeTand<IRationalsProvider>))]
|
|
ICollection<Rational> Generate(IEnumerable<(int n, int d)> input);
|
|
}
|
|
|
|
public class RationalsProvider : IRationalsProvider
|
|
{
|
|
public ICollection<Rational> Generate(IEnumerable<(int n, int d)> input) => input.Select(tuple => new Rational(tuple.n, tuple.d)).ToList();
|
|
}
|
|
} |