MoonTools.Graph/Graph/IGraph.cs

15 lines
393 B
C#
Raw Normal View History

2019-10-22 07:28:29 +00:00
using System.Collections.Generic;
namespace MoonTools.Core.Graph
{
2019-10-23 00:46:44 +00:00
public interface IGraph<TNode, TEdgeData> where TNode : System.IEquatable<TNode>
2019-10-22 07:28:29 +00:00
{
IEnumerable<TNode> Nodes { get; }
void AddNode(TNode node);
void AddNodes(params TNode[] nodes);
bool Exists(TNode node);
IEnumerable<TNode> Neighbors(TNode node);
void Clear();
}
}