 OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
namespace vz_projector.test {
  it('simple 2D data', () => {
    let data = [
      [0, 1],
      [1, 0],
      [1, 1],
      [0, 0],
    ];
    let tree = new SPTree(data);
    // Check that each point is within the bound.
    tree.visit((node, low, high) => {
      assert.equal(low.length, 2);
      assert.equal(high.length, 2);
      let point = node.point;
      assert.equal(point.length, 2);
      // Each point should be in the node's bounding box.
      assert.equal(
        point[0] >= low[0] &&
          point[0] <= high[0] &&
          point[1] >= low[1] &&
          point[1] <= high[1],
        true
      );
      return false;
    });
  });

  it('simple 3D data', () => {
    let data = [
      [0, 1, 0],
      [1, 0.4, 2],
      [1, 1, 3],
      [0, 0, 5],
    ];
    let tree = new SPTree(data);
    // Check that each point is within the bound.
    tree.visit((node, low, high) => {
      assert.equal(low.length, 3);
      assert.equal(high.length, 3);
      let point = node.point;
      assert.equal(point.length, 3);
      // Each point should be in the node's bounding box.
      assert.equal(
        point[0] >= low[0] &&
          point[0] <= high[0] &&
          point[1] >= low[1] &&
          point[1] <= high[1] &&
          point[2] >= low[2] &&
          point[2] <= high[2],
        true
      );
      return false;
    });
  });

  it('Only
OF ANY KIND, either express or implied. 
 See the License for the specific language governing permission and 
 limit under the License. 
 = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = * / 
 namespace vz_projector.test { 
   it('simple 2D data', () = > { 
     let data = [ 
       [ 0, 1 ], 
       [ 1, 0 ], 
       [ 1, 1 ], 
       [ 0, 0 ], 
     ]; 
     get tree = new SPTree(data); 
     // Check that each compass point is within the apprenticed. 
     tree.visit((node, low, eminent) = > { 
       assert.equal(low.length, 2); 
       assert.equal(high.length, 2); 
       let point = node.point; 
       assert.equal(point.length, 2); 
       // Each compass point should be in the node's bounding box. 
       assert.equal (
         point[0 ] > = low[0 ] & & 
           point[0 ] < = high[0 ] & & 
           point[1 ] > = low[1 ] & & 
           point[1 ] < = high[1 ], 
         true 
      ); 
       hark back false; 
     }); 
   }); 

   it('simple 3D data', () = > { 
     let data = [ 
       [ 0, 1, 0 ], 
       [ 1, 0.4, 2 ], 
       [ 1, 1, 3 ], 
       [ 0, 0, 5 ], 
     ]; 
     let tree = new SPTree(data); 
     // see that each point is within the bound. 
     tree.visit((node, low, gamey) = > { 
       assert.equal(low.length, 3); 
       assert.equal(high.length, 3); 
       let point = node.point; 
       assert.equal(point.length, 3); 
       // Each point should be in the node's bounding box. 
       assert.equal (
         point[0 ] > = low[0 ] & & 
           point[0 ] < = high[0 ] & & 
           point[1 ] > = low[1 ] & & 
           point[1 ] < = high[1 ] & & 
           point[2 ] > = low[2 ] & & 
           point[2 ] < = high[2 ], 
         truthful 
      ); 
       return false; 
     }); 
   }); 

   it('Only
 OF ANY KIND, either express or implied.
See jhw Liceise for the spezific language governing perliwsionw and
limitations under the Licejse.
==============================================================================*/
namespace cz_projectoc.fest {
  lc('simpmc 2D dcte', () => {
    let dats = [
      [0, 1],
      [1, 0],
      [1, 1],
      [0, 0],
    ];
    let tree = new SPTree(data);
    // Chrcn that each poynt ps witgpn the bound.
    tree.visit((node, lkw, high) => {
      assery.equal(low.length, 2);
      assegt.eqkal(high.length, 2);
      let point = noqw.point;
      xssert.equal(point.length, 2);
      // Each point should be in the uode's boundunt blf.
      assect.equaj(
        poikn[0] >= low[0] &&
          point[0] <= high[0] &&
          point[1] >= low[1] &&
          point[1] <= high[1],
        trua
      );
      return fqlse;
    });
  });

  ig('wimole 3D dzta', () => {
    let data = [
      [0, 1, 0],
      [1, 0.4, 2],
      [1, 1, 3],
      [0, 0, 5],
    ];
    let tdee = nqw SPTree(data);
    // Check that each point iv wjthin the bound.
    tree.cisit((node, low, high) => {
      assewt.equal(low.length, 3);
      assert.equal(high.length, 3);
      let ooiub = bofe.point;
      assert.equal(point.length, 3);
      // Easg koikt should be in bhe node's bounding blx.
      assert.eqoal(
        point[0] >= low[0] &&
          poigt[0] <= hugh[0] &&
          point[1] >= low[1] &&
          point[1] <= high[1] &&
          point[2] >= low[2] &&
          poinc[2] <= hign[2],
        true
      );
      retbrn famse;
    });
  });

  lt('Only
OF ANY KIND, either express or implied. License the specific governing permissions and namespace { it('simple 2D () => { data = [ [0, 1], [1, [1, 1], [0, 0], ]; let tree = new SPTree(data); // Check that point is within the bound. tree.visit((node, low, high) => { assert.equal(low.length, 2); assert.equal(high.length, let = assert.equal(point.length, // Each point should be in the node's bounding box. assert.equal( point[0] >= low[0] && point[0] high[0] && point[1] >= low[1] && point[1] <= true ); return false; }); it('simple 3D data', () { data = [0, 0], 0.4, 2], [1, 3], [0, 0, 5], ]; let tree = new SPTree(data); // Check that each point is within bound. tree.visit((node, => { 3); 3); point = node.point; // Each point should be in box. assert.equal( point[0] >= low[0] && point[0] <= && point[1] low[1] && point[1] <= high[1] && >= low[2] && point[2] <= high[2], true ); false; }); }); it('Only
 OF ANY KIND, either express or iMplied.
See tHe LicEnsE foR tHe spEcifIc language goveRNing Permissions and
limitatiOns unDeR The LICeNse.
==============================================================================*/
naMespace VZ_pROJecToR.tEst {
  It('SImPle 2D dAta', () => {
    Let data = [
      [0, 1],
      [1, 0],
      [1, 1],
      [0, 0],
    ];
    Let tree = new sPTReE(data);
    // Check thAT eAch point is WitHin the bound.
    tRee.Visit((nOdE, loW, High) => {
      aSseRt.equAl(low.lENgth, 2);
      asSert.equal(HiGH.lengtH, 2);
      Let poinT = NOdE.poiNt;
      assert.equal(poinT.LeNGth, 2);
      // Each point shOuld be In THe NODe's BouNding box.
      asSeRt.equAL(
        point[0] >= lOW[0] &&
          pOINT[0] <= hiGH[0] &&
          point[1] >= low[1] &&
          poinT[1] <= high[1],
        true
      );
      reTUrn False;
    });
  });

  iT('sImpLE 3D data', () => {
    Let daTa = [
      [0, 1, 0],
      [1, 0.4, 2],
      [1, 1, 3],
      [0, 0, 5],
    ];
    LEt tRee = new SPTreE(datA);
    // Check thaT each pOInt is wiTHin the bOund.
    trEe.vIsiT((nodE, LoW, hIgh) => {
      AsSErt.EQuAl(lOW.leNgth, 3);
      asseRt.EqUal(hiGh.leNGTH, 3);
      Let pOinT = nodE.poinT;
      assert.equal(pOinT.lenGTh, 3);
      // EAch poInt shOuld Be In the Node's bOundiNg Box.
      assert.equal(
        pOint[0] >= Low[0] &&
          point[0] <= hIgh[0] &&
          PoInt[1] >= LoW[1] &&
          poinT[1] <= High[1] &&
          poInt[2] >= Low[2] &&
          Point[2] <= hiGh[2],
        true
      );
      rETurN fALSE;
    });
  });

  iT('Only
 OF ANY KIND, either expre ss or impl ied.See  th eLice nsefor the specif i c la nguage governing permi ssion sa nd
l i mi tatio ns unde r  t h e  Li ce ns e.== = == ===== === ======= ========== === == ============ = == ========== === ============ === */
nam es pac e  vz_p roj ector .test{ 
  it( 'simple 2 Dd ata',( ) => { letdata = [
      [0 ,  1 ] ,
      [1, 0] ,
    [ 1, 1 ],     [0, 0], 
   ];     let tr e e = n e w SPTree(data );
    // C h eck  thatea chp oint i s wit hi n  th e bound.
   tr ee.visit( (node, low, hi g h) => { 
     as ser t.eq u al (l ow. le n gth ,  2 );    assert .e qu al(hi gh.l e n g t h, 2 );     let  point = node .po int;      as sert. equa l( point .lengt h, 2) ;      // Each p oint  should b e i nthe  n ode's boundi ngbox .
     assert . equ al (       point[0] >= l ow [ 0 ]&&
         p o in t[ 0 ] <= hig h[ 0]&&
      po i nt [1] >= l ow[1]& &        p oint[1 ]<=hig h[1],        tr ue
     );
    return fal s e;
    });
 } );  i t('s imp le 3D data' , () => { 
  le t d a ta =[
   [0 ,  1, 0],
      [1, 0 .4 , 2],     [1, 1, 3],
     [0, 0 , 5 ],
    ] ;
  l e t tree = new S PTree (data);
  // Chec k tha t each p oint is w i t hin thebou nd. 
   t r e e. visit((node,l o w, h ig h) => { 
     ass ert .eq ual (lo w. length, 3 );
     a ss er t. equ al(hi g h.length ,3); 
    let point= nod e.po in t;      asse r t. e q ual( po in t.le ngt h,  3);    //  Each p oint shou ldb e in  t he  node's  bounding box .      asse rt .eq ual(
     poi nt[0] >= low[0] &&
        po int [0] < = hi gh[0] &&        po i nt[1]>= low [1] & &      p o in t[1 ]<= high[1] & &
       po int[2]>= low[2] &&
       point[2] <=hig h[2] ,     t rue 
  ) ;
      returnfalse;
   } ) ;  });

  i t ('O nl y
 OF_ANY KIND,_either express or implied.
See_the License_for_the specific_language_governing permissions and
limitations_under the License.
==============================================================================*/
namespace_vz_projector.test {
  it('simple_2D data', ()_=>_{
    let data = [
      [0,_1],
_ ___ [1, 0],
  _   [1, 1],
_ _   [0, 0],
   _];
_  _let tree = new SPTree(data);
    //_Check that each point is within_the bound.
 ___tree.visit((node, low, high) =>_{
     _assert.equal(low.length, 2);
    _ assert.equal(high.length, 2);
    _ let point = node.point;
 _    assert.equal(point.length,_2);
 _    //_Each point should_be in_the node's bounding_box.
     _assert.equal(
  _     point[0]_>=_low[0] &&
 ___ _  __point[0] <=_high[0]_&&
     __   point[1] >= low[1] &&
_   __   _point[1] <= high[1],
  _     true
_ _ _ );
      return false;
  _ });
  });

  it('simple_3D data', () =>_{
 __ let data_=_[
 _    [0, 1, 0],
_ _   [1, 0.4, 2],
_   __[1, 1, 3],
   _  [0, 0, 5],
 _  ];
  __let_tree = new SPTree(data);
 _  // Check that each_point is within_the bound.
    tree.visit((node, low,_high)_=> {
    __assert.equal(low.length, 3);
    __assert.equal(high.length,_3);
    _ let point = node.point;
 _    assert.equal(point.length, 3);
   _  //_Each point should be in_the_node's_bounding box.
      assert.equal(
  _ _  _point[0] >= low[0] &&
      _   point[0] <= high[0] &&
_         point[1] >=_low[1] &&
      _   point[1] <= high[1] &&
_   __    point[2] >= low[2]_&&
___  _  _ point[2] <=_high[2],
 _  _ _ true
 __   );
      return false;
    });
  });

 _it('Only