/// <summary> Only method a program needs to use. /// Returns true iff the balance is successful. </summary> public static bool BalanceEquation(Equation eq) { //creates a new instance to be thread safe EquationBalancer balancer = new EquationBalancer(eq); if(!balancer.equation.Balanced) { balancer.BruteForceBalance(20, 0); } return balancer.equation.Balanced; }
/// <summary> Only method a program needs to use. /// Returns true iff the balance is successful. </summary> public static bool BalanceEquation(Equation eq) { //creates a new instance to be thread safe EquationBalancer balancer = new EquationBalancer(eq); if (!balancer.equation.Balanced) { balancer.BruteForceBalance(20, 0); } return(balancer.equation.Balanced); }