comment pass
This commit is contained in:
@@ -2,9 +2,11 @@ using System;
|
||||
|
||||
// ReSharper disable ReturnTypeCanBeEnumerable.Global
|
||||
// ReSharper disable ParameterTypeCanBeEnumerable.Local
|
||||
|
||||
namespace EscapeRoomEngine.Engine.Runtime.Utilities
|
||||
{
|
||||
/// <summary>
|
||||
/// The backtrack algorithm can calculate the subset of a set of samples with the sum closest to a target value.
|
||||
/// </summary>
|
||||
public struct Backtrack
|
||||
{
|
||||
private int[] indices;
|
||||
@@ -95,6 +97,9 @@ namespace EscapeRoomEngine.Engine.Runtime.Utilities
|
||||
return Sum(leave) < Sum(pick) ? leave : pick;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Combine the two brute force algorithms to calculate the optimal subset.
|
||||
/// </summary>
|
||||
public int[] BruteForce()
|
||||
{
|
||||
var lower = BruteForceLower();
|
||||
|
||||
Reference in New Issue
Block a user