Function hercules::python_interopt::rand

source ·
pub fn rand(
    problem: (Vec<usize>, Vec<usize>, Vec<f64>, Vec<f64>, usize),
    seed: usize,
    num_points: usize
) -> PyResult<Vec<usize>>
Expand description

This reads in the QUBO from a file, and solves the QUBO using random search, returns the best solution found.

Example

import hercules

# read in the QUBO from a file
problem = hercules.read_qubo("file.qubo")

# read in the QUBO from a file
x_soln = hercules.rand(problem, 0, 10)

§Errors

This function should never error, but if it does, it will abort.