scalanlp / breeze

Breeze is a numerical processing library for Scala.
www.scalanlp.org
Apache License 2.0
3.44k stars 691 forks source link

KuhnMunkresTest Testr #813

Closed HenryBao91 closed 2 years ago

HenryBao91 commented 3 years ago

I clone the project and want to run some test unit about KuhnMunkresTest code. Such code I ran

package breeze.optimize.linear

import org.scalatest._
import org.scalatestplus.scalacheck._
import org.scalacheck._

class KuhnMunkresTest extends FunSuite with Checkers {

  test("sanity check") {
    val arr = Array(Seq(2.0, 4.0, 7.0, 9.0), Seq(3.0, 9.0, 5.0, 1.0), Seq(8.0, 2.0, 9.0, 7.0));
    val (matching, weight) = KuhnMunkres.extractMatching(arr.map(_.toSeq));
    assert(weight === 5.0);
    assert(matching(0) === 0)
    assert(matching(1) === 3)
    assert(matching(2) === 1)
  }
....
}

But it came to an error:

/home/IdeaProjects/breeze/math/src/main/scala/breeze/collection/mutable/OpenAddressHashArray.scala:169:19
object ArrayUtil is not a member of package breeze.util
      breeze.util.ArrayUtil.copyOf(_data, _data.length),

So I check the path ./breeze/util/, thers is really no any code file named ArrayUtil

I don't know what should I do so that I can run these test unit.

dlwh commented 2 years ago

ArrayUtil is codegened with sbt. Are you building with SBT?