PIBD-14_Boyko_M_S_Cursach_DFS/Cursach/Manager.cs

21 lines
458 B
C#
Raw Normal View History

2024-05-22 20:29:11 +04:00
using Cursach.Parameters;
2024-05-16 00:37:58 +04:00
using Cursach.Realisations;
using Cursach.States;
namespace Cursach;
public class Manager(BFSParameters parameter)
{
2024-05-22 20:29:11 +04:00
private BFS BFS = new(parameter);
2024-05-16 00:37:58 +04:00
2024-05-22 20:29:11 +04:00
public StatesStorage StartBFS()
2024-05-16 00:37:58 +04:00
{
2024-05-22 20:29:11 +04:00
StatesStorage statesStorage = new();
statesStorage.AddState(BFS.GetState());
2024-05-16 00:37:58 +04:00
while (BFS.Step())
{
2024-05-22 20:29:11 +04:00
statesStorage.AddState(BFS.GetState());
2024-05-16 00:37:58 +04:00
}
2024-05-22 20:29:11 +04:00
return statesStorage;
2024-05-16 00:37:58 +04:00
}
}