Show / Hide Table of Contents

Interface ILayoutEvolver<TLayout, TNode>

Represents types capable of evolving layouts.

Namespace: Edgar.Legacy.Core.LayoutEvolvers.Interfaces
Assembly: Edgar.dll
Syntax
public interface ILayoutEvolver<TLayout, TNode>
Type Parameters
Name Description
TLayout

Type of the layout that will be evolved.

TNode

Type of the nodes that are present in the layout.

Methods

Evolve(TLayout, Chain<TNode>, Int32)

Returns valid layouts evolved from a given initial layout.

Declaration
IEnumerable<TLayout> Evolve(TLayout initialLayout, Chain<TNode> chain, int count)
Parameters
Type Name Description
TLayout initialLayout

A layout that is used as the base for the evolution.

Chain<TNode> chain

Only nodes from the chain should be perturbed.

System.Int32 count

How many layouts should be produced.

Returns
Type Description
System.Collections.Generic.IEnumerable<TLayout>
Remarks

It is advised to implement the method lazily using "yield return" syntax. The generation process can be then better controller and optimized.

The evolver may produce less than requested layouts if it finds itself in a situation where it is better to terminate than to continue.

Events

OnPerturbed

An event that is fired whenever a layout is perturbed.

Declaration
event EventHandler<TLayout> OnPerturbed
Event Type
Type Description
System.EventHandler<TLayout>

OnValid

An event that is fired whenever a valid layout is produced.

Declaration
event EventHandler<TLayout> OnValid
Event Type
Type Description
System.EventHandler<TLayout>
Back to top Generated by DocFX