Пример #1
0
        public ExplorationScope Build(INestedContainer scope, ExplorerContext context)
        {
            var explorationScope = new ExplorationScope(scope);

            explorationScope.UseContext(context);
            Configure(explorationScope, context);
            return(explorationScope);
        }
Пример #2
0
        protected override void Configure(ExplorationScope scope, ExplorerContext context)
        {
            var metadata = context.Columns
                           .Zip2(context.ColumnInfos, SingleColumnPublishers)
                           .Select((_, i) => new SingleColumnMetadata(_.Item1, i, _.Item2, _.Item3));

            scope.AddPublisher <ColumnCorrelationComponent>(
                initialise: c => c.Projections = BuildProjections(metadata).ToImmutableArray());

            scope.AddPublisher <CorrelatedSampleGenerator>();
        }
Пример #3
0
        public ColumnExploration(ExplorationScope scope)
            : base(scope)
        {
            if (!(Context is ExplorerContext))
            {
                throw new InvalidOperationException(
                          $"{nameof(ColumnExploration)} requires a context object in the {nameof(ExplorationScope)}!");
            }

            try
            {
                Column     = Context.Column;
                ColumnInfo = Context.ColumnInfo;
            }
            catch (InvalidOperationException)
            {
                throw new InvalidOperationException(
                          $"{nameof(ColumnExploration)} requires a single-column context but context has {Context.Columns.Length} columns.");
            }
        }
Пример #4
0
 protected AbstractExploration(ExplorationScope scope)
 {
     completionTask = new Lazy <Task>(async() => await Explore());
     Scope          = scope;
 }
Пример #5
0
 protected abstract void Configure(ExplorationScope scope, ExplorerContext context);