dp-wisp

dynamic programming algorithm for weighted interval scheduling problem

Usage no npm install needed!

<script type="module">
  import dpWisp from 'https://cdn.skypack.dev/dp-wisp';
</script>

README

dp-wisp

dp-wisp is a module computing solution for weighted interval scheduling problem, using dynamic programming algorithm described here. the signature of the only exported method is (jobs, weif), where jobs is an array of jobs, where each job has .s (start) and .f (finish) properties. weif is short for "weighting function", its signature should be (job), and it will be passed any job to determine the weight of that job. please check your arguments before invoking it!