Interface IConfigurationSpaces<TNode, TShape, TConfiguration, TConfigurationSpace>
Represents a data structure holding configuration spaces.
Namespace: Edgar.Legacy.Core.ConfigurationSpaces.Interfaces
Assembly: Edgar.dll
Syntax
public interface IConfigurationSpaces<in TNode, TShape, TConfiguration, out TConfigurationSpace>
Type Parameters
Name | Description |
---|---|
TNode | |
TShape | |
TConfiguration | |
TConfigurationSpace |
Methods
CanPerturbShape(TNode)
Checks whether a node can be shape perturbed.
Declaration
bool CanPerturbShape(TNode node)
Parameters
Type | Name | Description |
---|---|---|
TNode | node |
Returns
Type | Description |
---|---|
System.Boolean |
GetAllShapes()
Gets all shapes that can be used for at least one node.
Declaration
IEnumerable<TShape> GetAllShapes()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerable<TShape> |
GetConfigurationSpace(TShape, TShape)
Gets a configuration space for two shapes.
Declaration
TConfigurationSpace GetConfigurationSpace(TShape movingPolygon, TShape fixedPolygon)
Parameters
Type | Name | Description |
---|---|---|
TShape | movingPolygon | A polygon that can be moved through the returned configuration space. |
TShape | fixedPolygon | A polygon that stays fixed. |
Returns
Type | Description |
---|---|
TConfigurationSpace |
GetConfigurationSpace(TConfiguration, TConfiguration)
Gets a configuration space for two configurations.
Declaration
TConfigurationSpace GetConfigurationSpace(TConfiguration configuration1, TConfiguration configuration2)
Parameters
Type | Name | Description |
---|---|---|
TConfiguration | configuration1 | |
TConfiguration | configuration2 |
Returns
Type | Description |
---|---|
TConfigurationSpace |
GetMaximumIntersection(TConfiguration, IList<TConfiguration>)
Gets a maximum intersection of configuration spaces of given configurations with respect to the main configuration.
Declaration
IList<OrthogonalLineGrid2D> GetMaximumIntersection(TConfiguration mainConfiguration, IList<TConfiguration> configurations)
Parameters
Type | Name | Description |
---|---|---|
TConfiguration | mainConfiguration | Configuration of a node for which we look for a new position. |
System.Collections.Generic.IList<TConfiguration> | configurations | Configurations that we try to satisfy when looking for a new position. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<OrthogonalLineGrid2D> |
GetMaximumIntersection(TConfiguration, IList<TConfiguration>, out Int32)
Gets a maximum intersection of configuration spaces of given configurations with respect to the main configuration.
Declaration
IList<OrthogonalLineGrid2D> GetMaximumIntersection(TConfiguration mainConfiguration, IList<TConfiguration> configurations, out int configurationsSatisfied)
Parameters
Type | Name | Description |
---|---|---|
TConfiguration | mainConfiguration | Configuration of a node for which we look for a new position. |
System.Collections.Generic.IList<TConfiguration> | configurations | Configurations that we try to satisfy when looking for a new position. |
System.Int32 | configurationsSatisfied | How many of given configurations were satisfied. |
Returns
Type | Description |
---|---|
System.Collections.Generic.IList<OrthogonalLineGrid2D> |
GetRandomIntersectionPoint(TConfiguration, IList<TConfiguration>)
Gets a random point in the maximum intersection of configuration spaces of given configurations with respect to the main configuration.
Declaration
Vector2Int GetRandomIntersectionPoint(TConfiguration mainConfiguration, IList<TConfiguration> configurations)
Parameters
Type | Name | Description |
---|---|---|
TConfiguration | mainConfiguration | Configuration of a node for which we look for a new position. |
System.Collections.Generic.IList<TConfiguration> | configurations | Configurations that we try to satisfy when looking for a new position. |
Returns
Type | Description |
---|---|
Vector2Int |
GetRandomIntersectionPoint(TConfiguration, IList<TConfiguration>, out Int32)
Gets a random point in the maximum intersection of configuration spaces of given configurations with respect to the main configuration.
Declaration
Vector2Int GetRandomIntersectionPoint(TConfiguration mainConfiguration, IList<TConfiguration> configurations, out int configurationsSatisfied)
Parameters
Type | Name | Description |
---|---|---|
TConfiguration | mainConfiguration | Configuration of a node for which we look for a new position. |
System.Collections.Generic.IList<TConfiguration> | configurations | Configurations that we try to satisfy when looking for a new position. |
System.Int32 | configurationsSatisfied | How many of given configurations were satisfied. |
Returns
Type | Description |
---|---|
Vector2Int |
GetRandomShape(TNode)
Gets a random shape for a given node.
Declaration
TShape GetRandomShape(TNode node)
Parameters
Type | Name | Description |
---|---|---|
TNode | node |
Returns
Type | Description |
---|---|
TShape |
GetShapesForNode(TNode)
Gets all possible shapes for a given node.
Declaration
IReadOnlyCollection<TShape> GetShapesForNode(TNode node)
Parameters
Type | Name | Description |
---|---|---|
TNode | node |
Returns
Type | Description |
---|---|
System.Collections.Generic.IReadOnlyCollection<TShape> |
HaveValidPosition(TConfiguration, TConfiguration)
Checks if two configurations are valid with respect to each other.
Declaration
bool HaveValidPosition(TConfiguration configuration1, TConfiguration configuration2)
Parameters
Type | Name | Description |
---|---|---|
TConfiguration | configuration1 | |
TConfiguration | configuration2 |
Returns
Type | Description |
---|---|
System.Boolean |