solver function

Solver solver({
  1. LogicKind? logic,
  2. Map<String, Object> params = const {},
})

Creates a solver.

Implementation

Solver solver({LogicKind? logic, Map<String, Object> params = const {}}) {
  final result = currentContext.solver(logic: logic);
  final paramsObj = currentContext.emptyParams();
  for (final entry in params.entries) {
    paramsObj[entry.key] = entry.value;
  }
  result.setParams(paramsObj);
  return result;
}