is a flag that can be set to True to speed up the validation performed in Mathematica (via pattern tests) on arrays of data being sent as arguments to Java calls.


  • To use $RelaxedTypeChecking, you first need to load J/Link using Needs["JLink`"].
  • For a very large matrix, it can be expensive to test that it is, for instance, a rectangular matrix of integers before it is sent to Java.
  • This process is made faster by making the tests much less strict, so you must make sure that you pass methods exactly the arguments they expect.
  • The default value is False.
  • You can set and reset the value whenever you want; a typical use would be Block[{$RelaxedTypeChecking=True}, methodcall[matrix]].
New to Mathematica? Find your learning path »
Have a question? Ask support »