diff --git a/_r_e_a_d_m_e_8md.html b/_r_e_a_d_m_e_8md.html index c41a4b7f9..dfad221dc 100644 --- a/_r_e_a_d_m_e_8md.html +++ b/_r_e_a_d_m_e_8md.html @@ -102,7 +102,7 @@ diff --git a/annotated.html b/annotated.html index 37566dc83..aa4c6b373 100644 --- a/annotated.html +++ b/annotated.html @@ -147,7 +147,7 @@ diff --git a/barray-bones_8hpp.html b/barray-bones_8hpp.html index af7b8e44b..92618da39 100644 --- a/barray-bones_8hpp.html +++ b/barray-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/barray-bones_8hpp_source.html b/barray-bones_8hpp_source.html index a1721b079..7c4e920bc 100644 --- a/barray-bones_8hpp_source.html +++ b/barray-bones_8hpp_source.html @@ -328,7 +328,7 @@ diff --git a/barray-iterator_8hpp.html b/barray-iterator_8hpp.html index 36847b471..853414813 100644 --- a/barray-iterator_8hpp.html +++ b/barray-iterator_8hpp.html @@ -112,7 +112,7 @@ diff --git a/barray-iterator_8hpp_source.html b/barray-iterator_8hpp_source.html index 774b8f5a5..50a671724 100644 --- a/barray-iterator_8hpp_source.html +++ b/barray-iterator_8hpp_source.html @@ -148,7 +148,7 @@ diff --git a/barray-meat-operators_8hpp.html b/barray-meat-operators_8hpp.html index df94f910f..36c60016a 100644 --- a/barray-meat-operators_8hpp.html +++ b/barray-meat-operators_8hpp.html @@ -576,7 +576,7 @@

diff --git a/barray-meat-operators_8hpp_source.html b/barray-meat-operators_8hpp_source.html index e41c4d2fb..9b39cbe23 100644 --- a/barray-meat-operators_8hpp_source.html +++ b/barray-meat-operators_8hpp_source.html @@ -240,7 +240,7 @@ diff --git a/barray-meat_8hpp.html b/barray-meat_8hpp.html index 8da6ee055..5ee67c673 100644 --- a/barray-meat_8hpp.html +++ b/barray-meat_8hpp.html @@ -164,7 +164,7 @@

    - +
diff --git a/barray-meat_8hpp_source.html b/barray-meat_8hpp_source.html index 6affea36a..461d69432 100644 --- a/barray-meat_8hpp_source.html +++ b/barray-meat_8hpp_source.html @@ -1441,7 +1441,7 @@ diff --git a/barraycell-bones_8hpp.html b/barraycell-bones_8hpp.html index a1a810512..98a95e39b 100644 --- a/barraycell-bones_8hpp.html +++ b/barraycell-bones_8hpp.html @@ -123,7 +123,7 @@ diff --git a/barraycell-bones_8hpp_source.html b/barraycell-bones_8hpp_source.html index 65ce1aead..f57ad18d2 100644 --- a/barraycell-bones_8hpp_source.html +++ b/barraycell-bones_8hpp_source.html @@ -204,7 +204,7 @@ diff --git a/barraycell-meat_8hpp.html b/barraycell-meat_8hpp.html index 00f93e979..bae6d397e 100644 --- a/barraycell-meat_8hpp.html +++ b/barraycell-meat_8hpp.html @@ -113,7 +113,7 @@ diff --git a/barraycell-meat_8hpp_source.html b/barraycell-meat_8hpp_source.html index efd6cfa60..eb338d046 100644 --- a/barraycell-meat_8hpp_source.html +++ b/barraycell-meat_8hpp_source.html @@ -220,7 +220,7 @@ diff --git a/barraydense-bones_8hpp.html b/barraydense-bones_8hpp.html index cce28a32c..be270980a 100644 --- a/barraydense-bones_8hpp.html +++ b/barraydense-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/barraydense-bones_8hpp_source.html b/barraydense-bones_8hpp_source.html index e29507901..559d6d0fe 100644 --- a/barraydense-bones_8hpp_source.html +++ b/barraydense-bones_8hpp_source.html @@ -282,44 +282,44 @@
Baseline class for binary arrays.
-
Cell< Cell_Type > default_val() const
+
Cell< Cell_Type > default_val() const
std::vector< Cell_Type > get_col_vec(size_t i, bool check_bounds=true) const
-
void zero_row(size_t i, bool check_bounds=true)
-
bool is_empty(size_t i, size_t j, bool check_bounds=true) const
+
void zero_row(size_t i, bool check_bounds=true)
+
bool is_empty(size_t i, size_t j, bool check_bounds=true) const
BArrayDense< Cell_Type, Data_Type > & operator=(const BArrayDense< Cell_Type, Data_Type > &Array_)
Assignment constructor.
bool operator==(const BArrayDense< Cell_Type, Data_Type > &Array_)
-
void swap_cols(size_t j0, size_t j1, bool check_bounds=true)
-
const Cell_Type rowsum(size_t i) const
-
size_t ncol() const noexcept
-
const std::vector< Cell_Type > & get_data() const
-
void print(const char *fmt=nullptr,...) const
-
size_t nrow() const noexcept
-
size_t nnozero() const noexcept
-
void swap_cells(size_t i0, size_t j0, size_t i1, size_t j1, bool check_bounds=true, int check_exists=CHECK::BOTH, int *report=nullptr)
-
void insert_cell(size_t i, size_t j, const Cell< Cell_Type > &v, bool check_bounds, bool)
-
BArrayDenseCol< Cell_Type, Data_Type > & col(size_t j, bool check_bounds=true)
+
void swap_cols(size_t j0, size_t j1, bool check_bounds=true)
+
const Cell_Type rowsum(size_t i) const
+
size_t ncol() const noexcept
+
const std::vector< Cell_Type > & get_data() const
+
void print(const char *fmt=nullptr,...) const
+
size_t nrow() const noexcept
+
size_t nnozero() const noexcept
+
void swap_cells(size_t i0, size_t j0, size_t i1, size_t j1, bool check_bounds=true, int check_exists=CHECK::BOTH, int *report=nullptr)
+
void insert_cell(size_t i, size_t j, const Cell< Cell_Type > &v, bool check_bounds, bool)
+
BArrayDenseCol< Cell_Type, Data_Type > & col(size_t j, bool check_bounds=true)
-
void rm_cell(size_t i, size_t j, bool check_bounds=true, bool check_exists=true)
-
void clear(bool hard=true)
+
void rm_cell(size_t i, size_t j, bool check_bounds=true, bool check_exists=true)
+
void clear(bool hard=true)
void set_data(Data_Type *data_, bool delete_data_=false)
Set the data object.
Data_Type & D()
std::vector< Cell_Type > get_row_vec(size_t i, bool check_bounds=true) const
-
Entries< Cell_Type > get_entries() const
Get the edgelist.
+
Entries< Cell_Type > get_entries() const
Get the edgelist.
void out_of_range(size_t i, size_t j) const
-
void toggle_cell(size_t i, size_t j, bool check_bounds=true, int check_exists=EXISTS::UKNOWN)
-
void zero_col(size_t j, bool check_bounds=true)
+
void toggle_cell(size_t i, size_t j, bool check_bounds=true, int check_exists=EXISTS::UKNOWN)
+
void zero_col(size_t j, bool check_bounds=true)
Data_Type * D_ptr()
-
void swap_rows(size_t i0, size_t i1, bool check_bounds=true)
+
void swap_rows(size_t i0, size_t i1, bool check_bounds=true)
BArrayDense(size_t N_, size_t M_, Cell_Type value=static_cast< Cell_Type >(0))
Empty array.
bool is_dense() const noexcept
-
BArrayDenseRow< Cell_Type, Data_Type > & row(size_t i, bool check_bounds=true)
+
BArrayDenseRow< Cell_Type, Data_Type > & row(size_t i, bool check_bounds=true)
void toggle_lock(size_t i, size_t j, bool check_bounds=true)
-
const Cell_Type colsum(size_t i) const
- +
const Cell_Type colsum(size_t i) const
+
BArrayDense()
Zero-size array.
- -
void resize(size_t N_, size_t M_)
+ +
void resize(size_t N_, size_t M_)
Cell_Type get_cell(size_t i, size_t j, bool check_bounds=true) const
@@ -340,7 +340,7 @@ diff --git a/barraydense-meat-operators_8hpp.html b/barraydense-meat-operators_8hpp.html index 09d75eb3a..e63cee334 100644 --- a/barraydense-meat-operators_8hpp.html +++ b/barraydense-meat-operators_8hpp.html @@ -481,7 +481,7 @@

    - +
diff --git a/barraydense-meat-operators_8hpp_source.html b/barraydense-meat-operators_8hpp_source.html index f4049cb09..e299c7fff 100644 --- a/barraydense-meat-operators_8hpp_source.html +++ b/barraydense-meat-operators_8hpp_source.html @@ -231,7 +231,7 @@ diff --git a/barraydense-meat_8hpp.html b/barraydense-meat_8hpp.html index 26731586e..6b95d3af4 100644 --- a/barraydense-meat_8hpp.html +++ b/barraydense-meat_8hpp.html @@ -252,7 +252,7 @@

    - +
diff --git a/barraydense-meat_8hpp_source.html b/barraydense-meat_8hpp_source.html index 8d335a6c8..7dc5843ff 100644 --- a/barraydense-meat_8hpp_source.html +++ b/barraydense-meat_8hpp_source.html @@ -547,576 +547,580 @@
449  if (check_bounds)
450  out_of_range(0u, i);
451 
-
452  for (size_t j = 0u; j < N; ++j)
-
453  x->operator[](j) = el[POS(j, i)];//this->get_cell(iter->first, i, false);
-
454 
-
455 }
-
456 template<typename Cell_Type, typename Data_Type>
- -
458  size_t i,
-
459  bool check_bounds
-
460 ) const {
-
461 
-
462  if (check_bounds)
-
463  out_of_range(i, 0u);
-
464 
- -
466 
-
467 }
+
452  #if defined(__OPENMP) || defined(_OPENMP)
+
453  #pragma omp simd
+
454  #endif
+
455  #pragma code_align 32
+
456  for (size_t j = 0u; j < N; ++j)
+
457  x->operator[](j) = el[POS(j, i)];//this->get_cell(iter->first, i, false);
+
458 
+
459 }
+
460 template<typename Cell_Type, typename Data_Type>
+ +
462  size_t i,
+
463  bool check_bounds
+
464 ) const {
+
465 
+
466  if (check_bounds)
+
467  out_of_range(i, 0u);
468 
-
469 template<typename Cell_Type, typename Data_Type>
- -
471  size_t i,
-
472  bool check_bounds
-
473 ) {
-
474 
-
475  if (check_bounds)
-
476  out_of_range(i, 0u);
-
477 
-
478  return BArrayDenseRow<Cell_Type,Data_Type>(*this, i);
-
479 
-
480 }
+ +
470 
+
471 }
+
472 
+
473 template<typename Cell_Type, typename Data_Type>
+ +
475  size_t i,
+
476  bool check_bounds
+
477 ) {
+
478 
+
479  if (check_bounds)
+
480  out_of_range(i, 0u);
481 
-
482 template<typename Cell_Type, typename Data_Type>
- - -
485  size_t j,
-
486  bool check_bounds
-
487 ) const {
-
488 
-
489  if (check_bounds)
-
490  out_of_range(0u, j);
-
491 
- -
493 
-
494 }
+
482  return BArrayDenseRow<Cell_Type,Data_Type>(*this, i);
+
483 
+
484 }
+
485 
+
486 template<typename Cell_Type, typename Data_Type>
+ + +
489  size_t j,
+
490  bool check_bounds
+
491 ) const {
+
492 
+
493  if (check_bounds)
+
494  out_of_range(0u, j);
495 
-
496 template<typename Cell_Type, typename Data_Type>
- - -
499  size_t j,
-
500  bool check_bounds
-
501 ) {
-
502 
-
503  if (check_bounds)
-
504  out_of_range(0u, j);
-
505 
-
506  return BArrayDenseCol<Cell_Type,Data_Type>(*this, j);
-
507 
-
508 }
+ +
497 
+
498 }
+
499 
+
500 template<typename Cell_Type, typename Data_Type>
+ + +
503  size_t j,
+
504  bool check_bounds
+
505 ) {
+
506 
+
507  if (check_bounds)
+
508  out_of_range(0u, j);
509 
-
510 template<typename Cell_Type, typename Data_Type> inline Entries< Cell_Type > BArrayDense<Cell_Type, Data_Type>:: get_entries() const {
-
511 
-
512  size_t nzero = this->nnozero();
+
510  return BArrayDenseCol<Cell_Type,Data_Type>(*this, j);
+
511 
+
512 }
513 
-
514  Entries<Cell_Type> res(nzero);
+
514 template<typename Cell_Type, typename Data_Type> inline Entries< Cell_Type > BArrayDense<Cell_Type, Data_Type>:: get_entries() const {
515 
-
516  for (size_t i = 0u; i < N; ++i)
-
517  {
-
518  for (size_t j = 0u; j < M; ++j)
-
519  {
-
520 
-
521  if (el[POS(i, j)] != BARRY_ZERO_DENSE)
-
522  {
-
523 
-
524  res.source.push_back(i),
-
525  res.target.push_back(j),
-
526  res.val.push_back(el[POS(i, j)]);
+
516  size_t nzero = this->nnozero();
+
517 
+
518  Entries<Cell_Type> res(nzero);
+
519 
+
520  for (size_t i = 0u; i < N; ++i)
+
521  {
+
522  for (size_t j = 0u; j < M; ++j)
+
523  {
+
524 
+
525  if (el[POS(i, j)] != BARRY_ZERO_DENSE)
+
526  {
527 
-
528  }
-
529 
-
530 
-
531  }
-
532 
-
533  }
-
534 
-
535  return res;
+
528  res.source.push_back(i),
+
529  res.target.push_back(j),
+
530  res.val.push_back(el[POS(i, j)]);
+
531 
+
532  }
+
533 
+
534 
+
535  }
536 
-
537 }
-
538 
-
539 template<typename Cell_Type, typename Data_Type> inline bool BArrayDense<Cell_Type, Data_Type>:: is_empty(
-
540  size_t i,
-
541  size_t j,
-
542  bool check_bounds
-
543 ) const {
-
544 
-
545  if (check_bounds)
-
546  out_of_range(i, j);
-
547 
-
548  return el[POS(i, j)] == ZERO_CELL;
-
549 
-
550 }
-
551 
-
552 template<typename Cell_Type, typename Data_Type> inline size_t BArrayDense<Cell_Type, Data_Type>:: nrow() const noexcept {
-
553  return N;
+
537  }
+
538 
+
539  return res;
+
540 
+
541 }
+
542 
+
543 template<typename Cell_Type, typename Data_Type> inline bool BArrayDense<Cell_Type, Data_Type>:: is_empty(
+
544  size_t i,
+
545  size_t j,
+
546  bool check_bounds
+
547 ) const {
+
548 
+
549  if (check_bounds)
+
550  out_of_range(i, j);
+
551 
+
552  return el[POS(i, j)] == ZERO_CELL;
+
553 
554 }
555 
-
556 template<typename Cell_Type, typename Data_Type> inline size_t BArrayDense<Cell_Type, Data_Type>:: ncol() const noexcept {
-
557  return M;
+
556 template<typename Cell_Type, typename Data_Type> inline size_t BArrayDense<Cell_Type, Data_Type>:: nrow() const noexcept {
+
557  return N;
558 }
559 
-
560 template<typename Cell_Type, typename Data_Type> inline size_t BArrayDense<Cell_Type, Data_Type>:: nnozero() const noexcept {
-
561 
-
562  size_t nzero = 0u;
-
563  for (auto & v : el)
-
564  if (v != BARRY_ZERO_DENSE)
-
565  nzero++;
-
566 
-
567  return nzero;
-
568 }
-
569 
-
570 template<typename Cell_Type, typename Data_Type>
- -
572  return this->Cell_default;
-
573 }
-
574 
-
575 template<typename Cell_Type, typename Data_Type>
- -
577  const std::pair<size_t,size_t> & coords
-
578 ) {
-
579 
-
580 
-
581  size_t i = coords.first;
-
582  size_t j = coords.second;
-
583 
-
584  out_of_range(i, j);
-
585 
-
586  el[POS(i,j)] += 1;
-
587  el_rowsums[i] += 1;
-
588  el_colsums[j] += 1;
-
589 
-
590  return *this;
-
591 
-
592 }
-
593 
-
594 template<typename Cell_Type, typename Data_Type>
- -
596  const std::pair<size_t,size_t> & coords
-
597 ) {
-
598 
-
599  size_t i = coords.first;
-
600  size_t j = coords.second;
-
601 
-
602  out_of_range(i, j);
-
603 
-
604  Cell_Type old = el[POS(i,j)];
+
560 template<typename Cell_Type, typename Data_Type> inline size_t BArrayDense<Cell_Type, Data_Type>:: ncol() const noexcept {
+
561  return M;
+
562 }
+
563 
+
564 template<typename Cell_Type, typename Data_Type> inline size_t BArrayDense<Cell_Type, Data_Type>:: nnozero() const noexcept {
+
565 
+
566  size_t nzero = 0u;
+
567  for (auto & v : el)
+
568  if (v != BARRY_ZERO_DENSE)
+
569  nzero++;
+
570 
+
571  return nzero;
+
572 }
+
573 
+
574 template<typename Cell_Type, typename Data_Type>
+ +
576  return this->Cell_default;
+
577 }
+
578 
+
579 template<typename Cell_Type, typename Data_Type>
+ +
581  const std::pair<size_t,size_t> & coords
+
582 ) {
+
583 
+
584 
+
585  size_t i = coords.first;
+
586  size_t j = coords.second;
+
587 
+
588  out_of_range(i, j);
+
589 
+
590  el[POS(i,j)] += 1;
+
591  el_rowsums[i] += 1;
+
592  el_colsums[j] += 1;
+
593 
+
594  return *this;
+
595 
+
596 }
+
597 
+
598 template<typename Cell_Type, typename Data_Type>
+ +
600  const std::pair<size_t,size_t> & coords
+
601 ) {
+
602 
+
603  size_t i = coords.first;
+
604  size_t j = coords.second;
605 
-
606  el[POS(i,j)] = ZERO_CELL;
-
607  el_rowsums[i] -= old;
-
608  el_colsums[j] -= old;
-
609 
-
610  return *this;
-
611 
-
612 }
-
613 
-
614 template<typename Cell_Type, typename Data_Type>
- -
616  size_t i,
-
617  size_t j,
-
618  bool check_bounds
-
619 ) {
-
620 
-
621  return BArrayDenseCell<Cell_Type,Data_Type>(this, i, j, check_bounds);
-
622 
-
623 }
-
624 
-
625 template<typename Cell_Type, typename Data_Type>
- -
627  size_t i,
-
628  size_t j,
-
629  bool check_bounds
-
630 ) const {
-
631 
-
632  if (check_bounds)
-
633  out_of_range(i, j);
-
634 
-
635  return el[POS(i,j)];
-
636 
-
637 }
-
638 
-
639 template<typename Cell_Type, typename Data_Type>
- -
641  size_t i,
-
642  size_t j,
-
643  bool check_bounds,
-
644  bool check_exists
-
645 ) {
-
646 
-
647  // Checking the boundaries
-
648  if (check_bounds)
-
649  out_of_range(i,j);
-
650 
-
651  // BARRY_UNUSED(check_exists)
-
652 
-
653  // Remove the pointer first (so it wont point to empty)
-
654  el_rowsums[i] -= el[POS(i, j)];
-
655  el_colsums[j] -= el[POS(i, j)];
-
656  el[POS(i, j)] = BARRY_ZERO_DENSE;
-
657 
-
658  return;
-
659 
-
660 }
-
661 
-
662 template<typename Cell_Type, typename Data_Type>
- -
664  size_t i,
-
665  size_t j,
-
666  const Cell< Cell_Type> & v,
-
667  bool check_bounds,
-
668  bool
-
669 ) {
-
670 
-
671  if (check_bounds)
-
672  out_of_range(i,j);
-
673 
-
674  if (el[POS(i,j)] == BARRY_ZERO_DENSE)
-
675  {
-
676 
-
677  el_rowsums[i] += v.value;
-
678  el_colsums[j] += v.value;
-
679 
-
680  }
-
681  else
-
682  {
-
683 
-
684  Cell_Type old = el[POS(i,j)];
-
685  el_rowsums[i] += (v.value - old);
-
686  el_colsums[j] += (v.value - old);
+
606  out_of_range(i, j);
+
607 
+
608  Cell_Type old = el[POS(i,j)];
+
609 
+
610  el[POS(i,j)] = ZERO_CELL;
+
611  el_rowsums[i] -= old;
+
612  el_colsums[j] -= old;
+
613 
+
614  return *this;
+
615 
+
616 }
+
617 
+
618 template<typename Cell_Type, typename Data_Type>
+ +
620  size_t i,
+
621  size_t j,
+
622  bool check_bounds
+
623 ) {
+
624 
+
625  return BArrayDenseCell<Cell_Type,Data_Type>(this, i, j, check_bounds);
+
626 
+
627 }
+
628 
+
629 template<typename Cell_Type, typename Data_Type>
+ +
631  size_t i,
+
632  size_t j,
+
633  bool check_bounds
+
634 ) const {
+
635 
+
636  if (check_bounds)
+
637  out_of_range(i, j);
+
638 
+
639  return el[POS(i,j)];
+
640 
+
641 }
+
642 
+
643 template<typename Cell_Type, typename Data_Type>
+ +
645  size_t i,
+
646  size_t j,
+
647  bool check_bounds,
+
648  bool check_exists
+
649 ) {
+
650 
+
651  // Checking the boundaries
+
652  if (check_bounds)
+
653  out_of_range(i,j);
+
654 
+
655  // BARRY_UNUSED(check_exists)
+
656 
+
657  // Remove the pointer first (so it wont point to empty)
+
658  el_rowsums[i] -= el[POS(i, j)];
+
659  el_colsums[j] -= el[POS(i, j)];
+
660  el[POS(i, j)] = BARRY_ZERO_DENSE;
+
661 
+
662  return;
+
663 
+
664 }
+
665 
+
666 template<typename Cell_Type, typename Data_Type>
+ +
668  size_t i,
+
669  size_t j,
+
670  const Cell< Cell_Type> & v,
+
671  bool check_bounds,
+
672  bool
+
673 ) {
+
674 
+
675  if (check_bounds)
+
676  out_of_range(i,j);
+
677 
+
678  if (el[POS(i,j)] == BARRY_ZERO_DENSE)
+
679  {
+
680 
+
681  el_rowsums[i] += v.value;
+
682  el_colsums[j] += v.value;
+
683 
+
684  }
+
685  else
+
686  {
687 
-
688  }
-
689 
-
690  el[POS(i, j)] = v.value;
+
688  Cell_Type old = el[POS(i,j)];
+
689  el_rowsums[i] += (v.value - old);
+
690  el_colsums[j] += (v.value - old);
691 
-
692  return;
+
692  }
693 
-
694 
-
695 }
-
696 
-
697 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: insert_cell(
-
698  size_t i,
-
699  size_t j,
-
700  Cell_Type v,
-
701  bool check_bounds,
-
702  bool
-
703 ) {
-
704 
-
705  if (check_bounds)
-
706  out_of_range(i,j);
-
707 
-
708  if (el[POS(i,j)] == BARRY_ZERO_DENSE)
-
709  {
-
710 
-
711  el_rowsums[i] += v;
-
712  el_colsums[j] += v;
-
713 
-
714  }
-
715  else
-
716  {
-
717 
-
718  Cell_Type old = el[POS(i,j)];
-
719  el_rowsums[i] += (v - old);
-
720  el_colsums[j] += (v - old);
+
694  el[POS(i, j)] = v.value;
+
695 
+
696  return;
+
697 
+
698 
+
699 }
+
700 
+
701 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: insert_cell(
+
702  size_t i,
+
703  size_t j,
+
704  Cell_Type v,
+
705  bool check_bounds,
+
706  bool
+
707 ) {
+
708 
+
709  if (check_bounds)
+
710  out_of_range(i,j);
+
711 
+
712  if (el[POS(i,j)] == BARRY_ZERO_DENSE)
+
713  {
+
714 
+
715  el_rowsums[i] += v;
+
716  el_colsums[j] += v;
+
717 
+
718  }
+
719  else
+
720  {
721 
-
722  }
-
723 
-
724  el[POS(i, j)] = v;
+
722  Cell_Type old = el[POS(i,j)];
+
723  el_rowsums[i] += (v - old);
+
724  el_colsums[j] += (v - old);
725 
-
726 }
+
726  }
727 
-
728 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: swap_cells (
-
729  size_t i0, size_t j0,
-
730  size_t i1, size_t j1,
-
731  bool check_bounds,
-
732  int check_exists,
-
733  int * report
-
734 ) {
-
735 
-
736  if (check_bounds) {
-
737  out_of_range(i0,j0);
-
738  out_of_range(i1,j1);
-
739  }
-
740 
-
741 
-
742  // Just in case, if this was passed
-
743  if (report != nullptr)
-
744  (*report) = EXISTS::BOTH;
-
745 
-
746  // If source and target coincide, we do nothing
-
747  if ((i0 == i1) && (j0 == j1))
-
748  return;
-
749 
-
750  // Updating rowand col sumns
-
751  Cell_Type val0 = el[POS(i0,j0)];
-
752  Cell_Type val1 = el[POS(i1,j1)];
+
728  el[POS(i, j)] = v;
+
729 
+
730 }
+
731 
+
732 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: swap_cells (
+
733  size_t i0, size_t j0,
+
734  size_t i1, size_t j1,
+
735  bool check_bounds,
+
736  int check_exists,
+
737  int * report
+
738 ) {
+
739 
+
740  if (check_bounds) {
+
741  out_of_range(i0,j0);
+
742  out_of_range(i1,j1);
+
743  }
+
744 
+
745 
+
746  // Just in case, if this was passed
+
747  if (report != nullptr)
+
748  (*report) = EXISTS::BOTH;
+
749 
+
750  // If source and target coincide, we do nothing
+
751  if ((i0 == i1) && (j0 == j1))
+
752  return;
753 
-
754  rm_cell(i0, j0, false, false);
-
755  rm_cell(i1, j1, false, false);
-
756 
-
757  // Inserting the cells by reference, these will be deleted afterwards
-
758  insert_cell(i0, j0, val1, false, false);
-
759  insert_cell(i1, j1, val0, false, false);
+
754  // Updating rowand col sumns
+
755  Cell_Type val0 = el[POS(i0,j0)];
+
756  Cell_Type val1 = el[POS(i1,j1)];
+
757 
+
758  rm_cell(i0, j0, false, false);
+
759  rm_cell(i1, j1, false, false);
760 
-
761  return;
-
762 
-
763 }
-
764 
-
765 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: toggle_cell (
-
766  size_t i,
-
767  size_t j,
-
768  bool check_bounds,
-
769  int check_exists
-
770 ) {
-
771 
-
772  if (check_bounds)
-
773  out_of_range(i, j);
-
774 
-
775  if (el[POS(i,j)] == ZERO_CELL)
-
776  insert_cell(i,j,1,false,false);
-
777  else
-
778  rm_cell(i,j,false,false);
-
779 
-
780  return;
-
781 
-
782 }
-
783 
-
784 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: swap_rows (
-
785  size_t i0,
-
786  size_t i1,
-
787  bool check_bounds
-
788 ) {
-
789 
-
790  if (check_bounds)
-
791  {
-
792 
-
793  out_of_range(i0,0u);
-
794  out_of_range(i1,0u);
-
795 
-
796  }
-
797 
-
798  // if (NCells == 0u)
-
799  // return;
-
800 
-
801  // Swapping happens naturally, need to take care of the pointers
-
802  // though
-
803  for (size_t j = 0u; j < M; ++j)
-
804  std::swap(el[POS(i0, j)], el[POS(i1, j)]);
-
805 
-
806  std::swap(el_rowsums[i0], el_rowsums[i1]);
-
807 
-
808  return;
-
809 }
-
810 
-
811 // This swapping is more expensive overall
-
812 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: swap_cols (
-
813  size_t j0,
-
814  size_t j1,
-
815  bool check_bounds
-
816 ) {
-
817 
-
818  if (check_bounds)
-
819  {
-
820 
-
821  out_of_range(0u, j0);
-
822  out_of_range(0u, j1);
-
823 
-
824  }
-
825 
-
826  if ((el_colsums[j0] == ZERO_CELL) && el_colsums[j1] == ZERO_CELL)
-
827  return;
-
828 
-
829  // Swapping happens naturally, need to take care of the pointers
-
830  // though
-
831  for (size_t i = 0u; i < N; ++i)
-
832  std::swap(el[POS(i, j0)], el[POS(i, j1)]);
-
833 
-
834  std::swap(el_colsums[j0], el_colsums[j1]);
-
835 
-
836  return;
-
837 }
-
838 
-
839 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: zero_row (
-
840  size_t i,
-
841  bool check_bounds
-
842  ) {
-
843 
-
844  if (check_bounds)
-
845  out_of_range(i, 0u);
-
846 
-
847  if (el_rowsums[i] == ZERO_CELL)
-
848  return;
-
849 
-
850  // Else, remove all elements
-
851  for (size_t col = 0u; col < M; col++)
-
852  rm_cell(i, col, false, false);
-
853 
-
854  return;
-
855 
-
856 }
-
857 
-
858 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: zero_col (
-
859  size_t j,
-
860  bool check_bounds
-
861  ) {
-
862 
-
863  if (check_bounds)
-
864  out_of_range(0u, j);
-
865 
-
866  if (el_colsums[j] == ZERO_CELL)
-
867  return;
-
868 
-
869  // Else, remove all elements
-
870  for (size_t row = 0u; row < N; row++)
-
871  rm_cell(row, j, false, false);
+
761  // Inserting the cells by reference, these will be deleted afterwards
+
762  insert_cell(i0, j0, val1, false, false);
+
763  insert_cell(i1, j1, val0, false, false);
+
764 
+
765  return;
+
766 
+
767 }
+
768 
+
769 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: toggle_cell (
+
770  size_t i,
+
771  size_t j,
+
772  bool check_bounds,
+
773  int check_exists
+
774 ) {
+
775 
+
776  if (check_bounds)
+
777  out_of_range(i, j);
+
778 
+
779  if (el[POS(i,j)] == ZERO_CELL)
+
780  insert_cell(i,j,1,false,false);
+
781  else
+
782  rm_cell(i,j,false,false);
+
783 
+
784  return;
+
785 
+
786 }
+
787 
+
788 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: swap_rows (
+
789  size_t i0,
+
790  size_t i1,
+
791  bool check_bounds
+
792 ) {
+
793 
+
794  if (check_bounds)
+
795  {
+
796 
+
797  out_of_range(i0,0u);
+
798  out_of_range(i1,0u);
+
799 
+
800  }
+
801 
+
802  // if (NCells == 0u)
+
803  // return;
+
804 
+
805  // Swapping happens naturally, need to take care of the pointers
+
806  // though
+
807  for (size_t j = 0u; j < M; ++j)
+
808  std::swap(el[POS(i0, j)], el[POS(i1, j)]);
+
809 
+
810  std::swap(el_rowsums[i0], el_rowsums[i1]);
+
811 
+
812  return;
+
813 }
+
814 
+
815 // This swapping is more expensive overall
+
816 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: swap_cols (
+
817  size_t j0,
+
818  size_t j1,
+
819  bool check_bounds
+
820 ) {
+
821 
+
822  if (check_bounds)
+
823  {
+
824 
+
825  out_of_range(0u, j0);
+
826  out_of_range(0u, j1);
+
827 
+
828  }
+
829 
+
830  if ((el_colsums[j0] == ZERO_CELL) && el_colsums[j1] == ZERO_CELL)
+
831  return;
+
832 
+
833  // Swapping happens naturally, need to take care of the pointers
+
834  // though
+
835  for (size_t i = 0u; i < N; ++i)
+
836  std::swap(el[POS(i, j0)], el[POS(i, j1)]);
+
837 
+
838  std::swap(el_colsums[j0], el_colsums[j1]);
+
839 
+
840  return;
+
841 }
+
842 
+
843 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: zero_row (
+
844  size_t i,
+
845  bool check_bounds
+
846  ) {
+
847 
+
848  if (check_bounds)
+
849  out_of_range(i, 0u);
+
850 
+
851  if (el_rowsums[i] == ZERO_CELL)
+
852  return;
+
853 
+
854  // Else, remove all elements
+
855  for (size_t col = 0u; col < M; col++)
+
856  rm_cell(i, col, false, false);
+
857 
+
858  return;
+
859 
+
860 }
+
861 
+
862 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: zero_col (
+
863  size_t j,
+
864  bool check_bounds
+
865  ) {
+
866 
+
867  if (check_bounds)
+
868  out_of_range(0u, j);
+
869 
+
870  if (el_colsums[j] == ZERO_CELL)
+
871  return;
872 
-
873  return;
-
874 
-
875 }
-
876 
-
877 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: transpose () {
+
873  // Else, remove all elements
+
874  for (size_t row = 0u; row < N; row++)
+
875  rm_cell(row, j, false, false);
+
876 
+
877  return;
878 
-
879  // if (NCells == 0u)
-
880  // {
-
881 
-
882  // std::swap(N, M);
-
883  // return;
-
884 
-
885  // }
-
886 
-
887  // Start by flipping the switch
-
888  visited = !visited;
-
889 
-
890  // size_t N0 = N, M0 = M;
-
891  std::vector< Cell< Cell_Type > > tmp_el(std::move(el));
-
892  el.resize(N * M, ZERO_CELL);
-
893  for (size_t i = 0u; i < N; ++i)
-
894  for (size_t j = 0u; j < M; ++j)
-
895  std::swap(tmp_el[POS(i, j)], el[POS_N(j, i, M)]);
-
896 
-
897  // Swapping the values
-
898  std::swap(N, M);
-
899  std::swap(el_rowsums, el_colsums);
+
879 }
+
880 
+
881 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: transpose () {
+
882 
+
883  // if (NCells == 0u)
+
884  // {
+
885 
+
886  // std::swap(N, M);
+
887  // return;
+
888 
+
889  // }
+
890 
+
891  // Start by flipping the switch
+
892  visited = !visited;
+
893 
+
894  // size_t N0 = N, M0 = M;
+
895  std::vector< Cell< Cell_Type > > tmp_el(std::move(el));
+
896  el.resize(N * M, ZERO_CELL);
+
897  for (size_t i = 0u; i < N; ++i)
+
898  for (size_t j = 0u; j < M; ++j)
+
899  std::swap(tmp_el[POS(i, j)], el[POS_N(j, i, M)]);
900 
-
901  return;
-
902 
-
903 }
-
904 
-
905 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: clear (
-
906  bool hard
-
907 ) {
-
908 
-
909  BARRY_UNUSED(hard)
-
910 
-
911  std::fill(el.begin(), el.end(), ZERO_CELL);
-
912  std::fill(el_rowsums.begin(), el_rowsums.end(), ZERO_CELL);
-
913  std::fill(el_colsums.begin(), el_colsums.end(), ZERO_CELL);
+
901  // Swapping the values
+
902  std::swap(N, M);
+
903  std::swap(el_rowsums, el_colsums);
+
904 
+
905  return;
+
906 
+
907 }
+
908 
+
909 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: clear (
+
910  bool hard
+
911 ) {
+
912 
+
913  BARRY_UNUSED(hard)
914 
-
915  return;
-
916 
-
917 }
-
918 
-
919 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: resize (
-
920  size_t N_,
-
921  size_t M_
-
922 ) {
-
923 
-
924  // Moving stuff around
-
925  std::vector< Cell_Type > el_tmp(el);
-
926  el.resize(N_ * M_, ZERO_CELL);
-
927  el_rowsums.resize(N_, ZERO_CELL);
-
928  el_colsums.resize(M_, ZERO_CELL);
-
929 
-
930  for (size_t i = 0u; i < N; ++i)
-
931  {
-
932  // If reached the end
-
933  if (i >= N_)
-
934  break;
-
935 
-
936  for (size_t j = 0u; j < M; ++j)
-
937  {
-
938 
-
939  if (j >= M_)
-
940  break;
-
941 
-
942  insert_cell(i, j, el_tmp[POS_N(i, j, N_)], false, false);
-
943 
-
944  }
+
915  std::fill(el.begin(), el.end(), ZERO_CELL);
+
916  std::fill(el_rowsums.begin(), el_rowsums.end(), ZERO_CELL);
+
917  std::fill(el_colsums.begin(), el_colsums.end(), ZERO_CELL);
+
918 
+
919  return;
+
920 
+
921 }
+
922 
+
923 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: resize (
+
924  size_t N_,
+
925  size_t M_
+
926 ) {
+
927 
+
928  // Moving stuff around
+
929  std::vector< Cell_Type > el_tmp(el);
+
930  el.resize(N_ * M_, ZERO_CELL);
+
931  el_rowsums.resize(N_, ZERO_CELL);
+
932  el_colsums.resize(M_, ZERO_CELL);
+
933 
+
934  for (size_t i = 0u; i < N; ++i)
+
935  {
+
936  // If reached the end
+
937  if (i >= N_)
+
938  break;
+
939 
+
940  for (size_t j = 0u; j < M; ++j)
+
941  {
+
942 
+
943  if (j >= M_)
+
944  break;
945 
-
946  }
+
946  insert_cell(i, j, el_tmp[POS_N(i, j, N_)], false, false);
947 
-
948  N = N_;
-
949  M = M_;
-
950 
-
951  return;
-
952 
-
953 }
-
954 
-
955 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: reserve () {
+
948  }
+
949 
+
950  }
+
951 
+
952  N = N_;
+
953  M = M_;
+
954 
+
955  return;
956 
-
957  el.reserve(N * M);
-
958  el_rowsums.reserve(N);
-
959  el_colsums.reserve(M);
-
960  return;
-
961 
-
962 }
-
963 
-
964 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: print (
-
965  const char * fmt,
-
966  ...
-
967 ) const
-
968 {
-
969 
-
970  std::va_list args;
-
971  va_start(args, fmt);
-
972  printf_barry(fmt, args);
-
973  va_end(args);
-
974 
-
975  for (size_t i = 0u; i < N; ++i)
-
976  {
-
977 
-
978  printf_barry("[%3li,] ", i);
-
979 
-
980  for (size_t j = 0u; j < M; ++j)
-
981  {
-
982 
-
983  if (this->is_empty(i, j, false))
-
984  printf_barry(" . ");
-
985  else
-
986  printf_barry(" %.2f ", static_cast<double>(this->get_cell(i, j, false)));
-
987 
-
988  }
-
989 
-
990  printf_barry("\n");
-
991 
-
992  }
-
993 
-
994  return;
-
995 
-
996 }
-
997 
-
998 template<typename Cell_Type, typename Data_Type> inline const std::vector< Cell_Type > & BArrayDense<Cell_Type, Data_Type>:: get_data() const
-
999 {
-
1000  return el;
-
1001 }
-
1002 
-
1003 template<typename Cell_Type, typename Data_Type> inline const Cell_Type BArrayDense<Cell_Type, Data_Type>:: rowsum(size_t i) const
-
1004 {
-
1005  return el_rowsums[i];
-
1006 }
-
1007 
-
1008 template<typename Cell_Type, typename Data_Type> inline const Cell_Type BArrayDense<Cell_Type, Data_Type>:: colsum(size_t j) const
-
1009 {
-
1010  return el_colsums[j];
-
1011 }
-
1012 
-
1013 #undef ROW
-
1014 #undef COL
-
1015 #undef POS
-
1016 #undef POS_N
-
1017 
-
1018 #undef ZERO_CELL
-
1019 
-
1020 #endif
+
957 }
+
958 
+
959 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: reserve () {
+
960 
+
961  el.reserve(N * M);
+
962  el_rowsums.reserve(N);
+
963  el_colsums.reserve(M);
+
964  return;
+
965 
+
966 }
+
967 
+
968 template<typename Cell_Type, typename Data_Type> inline void BArrayDense<Cell_Type, Data_Type>:: print (
+
969  const char * fmt,
+
970  ...
+
971 ) const
+
972 {
+
973 
+
974  std::va_list args;
+
975  va_start(args, fmt);
+
976  printf_barry(fmt, args);
+
977  va_end(args);
+
978 
+
979  for (size_t i = 0u; i < N; ++i)
+
980  {
+
981 
+
982  printf_barry("[%3li,] ", i);
+
983 
+
984  for (size_t j = 0u; j < M; ++j)
+
985  {
+
986 
+
987  if (this->is_empty(i, j, false))
+
988  printf_barry(" . ");
+
989  else
+
990  printf_barry(" %.2f ", static_cast<double>(this->get_cell(i, j, false)));
+
991 
+
992  }
+
993 
+
994  printf_barry("\n");
+
995 
+
996  }
+
997 
+
998  return;
+
999 
+
1000 }
+
1001 
+
1002 template<typename Cell_Type, typename Data_Type> inline const std::vector< Cell_Type > & BArrayDense<Cell_Type, Data_Type>:: get_data() const
+
1003 {
+
1004  return el;
+
1005 }
+
1006 
+
1007 template<typename Cell_Type, typename Data_Type> inline const Cell_Type BArrayDense<Cell_Type, Data_Type>:: rowsum(size_t i) const
+
1008 {
+
1009  return el_rowsums[i];
+
1010 }
+
1011 
+
1012 template<typename Cell_Type, typename Data_Type> inline const Cell_Type BArrayDense<Cell_Type, Data_Type>:: colsum(size_t j) const
+
1013 {
+
1014  return el_colsums[j];
+
1015 }
+
1016 
+
1017 #undef ROW
+
1018 #undef COL
+
1019 #undef POS
+
1020 #undef POS_N
1021 
+
1022 #undef ZERO_CELL
+
1023 
+
1024 #endif
+
1025 
#define POS_N(a, b, c)
#define ZERO_CELL
#define POS(a, b)
@@ -1129,45 +1133,45 @@
Baseline class for binary arrays.
-
Cell< Cell_Type > default_val() const
+
Cell< Cell_Type > default_val() const
std::vector< Cell_Type > get_col_vec(size_t i, bool check_bounds=true) const
-
void zero_row(size_t i, bool check_bounds=true)
-
bool is_empty(size_t i, size_t j, bool check_bounds=true) const
+
void zero_row(size_t i, bool check_bounds=true)
+
bool is_empty(size_t i, size_t j, bool check_bounds=true) const
BArrayDense< Cell_Type, Data_Type > & operator=(const BArrayDense< Cell_Type, Data_Type > &Array_)
Assignment constructor.
bool operator==(const BArrayDense< Cell_Type, Data_Type > &Array_)
-
void swap_cols(size_t j0, size_t j1, bool check_bounds=true)
-
const Cell_Type rowsum(size_t i) const
-
size_t ncol() const noexcept
-
const std::vector< Cell_Type > & get_data() const
-
void print(const char *fmt=nullptr,...) const
-
size_t nrow() const noexcept
-
size_t nnozero() const noexcept
-
void swap_cells(size_t i0, size_t j0, size_t i1, size_t j1, bool check_bounds=true, int check_exists=CHECK::BOTH, int *report=nullptr)
-
void insert_cell(size_t i, size_t j, const Cell< Cell_Type > &v, bool check_bounds, bool)
-
BArrayDenseCol< Cell_Type, Data_Type > & col(size_t j, bool check_bounds=true)
+
void swap_cols(size_t j0, size_t j1, bool check_bounds=true)
+
const Cell_Type rowsum(size_t i) const
+
size_t ncol() const noexcept
+
const std::vector< Cell_Type > & get_data() const
+
void print(const char *fmt=nullptr,...) const
+
size_t nrow() const noexcept
+
size_t nnozero() const noexcept
+
void swap_cells(size_t i0, size_t j0, size_t i1, size_t j1, bool check_bounds=true, int check_exists=CHECK::BOTH, int *report=nullptr)
+
void insert_cell(size_t i, size_t j, const Cell< Cell_Type > &v, bool check_bounds, bool)
+
BArrayDenseCol< Cell_Type, Data_Type > & col(size_t j, bool check_bounds=true)
-
void rm_cell(size_t i, size_t j, bool check_bounds=true, bool check_exists=true)
-
void clear(bool hard=true)
+
void rm_cell(size_t i, size_t j, bool check_bounds=true, bool check_exists=true)
+
void clear(bool hard=true)
void set_data(Data_Type *data_, bool delete_data_=false)
Set the data object.
Data_Type & D()
std::vector< Cell_Type > get_row_vec(size_t i, bool check_bounds=true) const
-
Entries< Cell_Type > get_entries() const
Get the edgelist.
+
Entries< Cell_Type > get_entries() const
Get the edgelist.
void out_of_range(size_t i, size_t j) const
-
void toggle_cell(size_t i, size_t j, bool check_bounds=true, int check_exists=EXISTS::UKNOWN)
-
void zero_col(size_t j, bool check_bounds=true)
+
void toggle_cell(size_t i, size_t j, bool check_bounds=true, int check_exists=EXISTS::UKNOWN)
+
void zero_col(size_t j, bool check_bounds=true)
Data_Type * D_ptr()
-
void swap_rows(size_t i0, size_t i1, bool check_bounds=true)
-
BArrayDense< Cell_Type, Data_Type > & operator+=(const std::pair< size_t, size_t > &coords)
-
BArrayDenseCell< Cell_Type, Data_Type > operator()(size_t i, size_t j, bool check_bounds=true)
-
BArrayDenseRow< Cell_Type, Data_Type > & row(size_t i, bool check_bounds=true)
-
const Cell_Type colsum(size_t i) const
- +
void swap_rows(size_t i0, size_t i1, bool check_bounds=true)
+
BArrayDense< Cell_Type, Data_Type > & operator+=(const std::pair< size_t, size_t > &coords)
+
BArrayDenseCell< Cell_Type, Data_Type > operator()(size_t i, size_t j, bool check_bounds=true)
+
BArrayDenseRow< Cell_Type, Data_Type > & row(size_t i, bool check_bounds=true)
+
const Cell_Type colsum(size_t i) const
+
BArrayDense()
Zero-size array.
- -
void resize(size_t N_, size_t M_)
+ +
void resize(size_t N_, size_t M_)
Cell_Type get_cell(size_t i, size_t j, bool check_bounds=true) const
-
BArrayDense< Cell_Type, Data_Type > & operator-=(const std::pair< size_t, size_t > &coords)
+
BArrayDense< Cell_Type, Data_Type > & operator-=(const std::pair< size_t, size_t > &coords)
Entries in BArray. For now, it only has two members:
Definition: cell-bones.hpp:10
@@ -1186,7 +1190,7 @@ diff --git a/barraydensecell-bones_8hpp.html b/barraydensecell-bones_8hpp.html index 6a87b7be0..5cb4673e8 100644 --- a/barraydensecell-bones_8hpp.html +++ b/barraydensecell-bones_8hpp.html @@ -158,7 +158,7 @@

    - +
diff --git a/barraydensecell-bones_8hpp_source.html b/barraydensecell-bones_8hpp_source.html index 849032891..78508c77a 100644 --- a/barraydensecell-bones_8hpp_source.html +++ b/barraydensecell-bones_8hpp_source.html @@ -179,8 +179,8 @@
Baseline class for binary arrays.
-
size_t ncol() const noexcept
-
size_t nrow() const noexcept
+
size_t ncol() const noexcept
+
size_t nrow() const noexcept
size_t size_t j
size_t i
@@ -189,7 +189,7 @@ diff --git a/barraydensecell-meat_8hpp.html b/barraydensecell-meat_8hpp.html index 8ce67e5ea..28a96f1ba 100644 --- a/barraydensecell-meat_8hpp.html +++ b/barraydensecell-meat_8hpp.html @@ -152,7 +152,7 @@

    - +
diff --git a/barraydensecell-meat_8hpp_source.html b/barraydensecell-meat_8hpp_source.html index 119893dc7..f9c1e1a3c 100644 --- a/barraydensecell-meat_8hpp_source.html +++ b/barraydensecell-meat_8hpp_source.html @@ -235,7 +235,7 @@ diff --git a/barraydensecol-bones_8hpp.html b/barraydensecol-bones_8hpp.html index 31cfc9510..c66d0a62e 100644 --- a/barraydensecol-bones_8hpp.html +++ b/barraydensecol-bones_8hpp.html @@ -216,7 +216,7 @@

    - +
diff --git a/barraydensecol-bones_8hpp_source.html b/barraydensecol-bones_8hpp_source.html index dd8e981c7..ec93da1ea 100644 --- a/barraydensecol-bones_8hpp_source.html +++ b/barraydensecol-bones_8hpp_source.html @@ -246,7 +246,7 @@ diff --git a/barraydenserow-bones_8hpp.html b/barraydenserow-bones_8hpp.html index 45036f3a2..04aa68ce0 100644 --- a/barraydenserow-bones_8hpp.html +++ b/barraydenserow-bones_8hpp.html @@ -216,7 +216,7 @@

    - +
diff --git a/barraydenserow-bones_8hpp_source.html b/barraydenserow-bones_8hpp_source.html index 46a295cad..ebc4895c4 100644 --- a/barraydenserow-bones_8hpp_source.html +++ b/barraydenserow-bones_8hpp_source.html @@ -257,7 +257,7 @@ diff --git a/barrayrow-bones_8hpp.html b/barrayrow-bones_8hpp.html index 143beedbe..27b6464b8 100644 --- a/barrayrow-bones_8hpp.html +++ b/barrayrow-bones_8hpp.html @@ -114,7 +114,7 @@ diff --git a/barrayrow-bones_8hpp_source.html b/barrayrow-bones_8hpp_source.html index 43819000b..50d88ec38 100644 --- a/barrayrow-bones_8hpp_source.html +++ b/barrayrow-bones_8hpp_source.html @@ -195,7 +195,7 @@ diff --git a/barrayrow-meat_8hpp.html b/barrayrow-meat_8hpp.html index a37a58501..2aa719a08 100644 --- a/barrayrow-meat_8hpp.html +++ b/barrayrow-meat_8hpp.html @@ -350,7 +350,7 @@

    - +
diff --git a/barrayrow-meat_8hpp_source.html b/barrayrow-meat_8hpp_source.html index fd9a2b0a8..c58ad46be 100644 --- a/barrayrow-meat_8hpp_source.html +++ b/barrayrow-meat_8hpp_source.html @@ -229,7 +229,7 @@ diff --git a/barrayvector-bones_8hpp.html b/barrayvector-bones_8hpp.html index 0049b8d21..1de5308eb 100644 --- a/barrayvector-bones_8hpp.html +++ b/barrayvector-bones_8hpp.html @@ -115,7 +115,7 @@ diff --git a/barrayvector-bones_8hpp_source.html b/barrayvector-bones_8hpp_source.html index c5199fb30..f1c58e806 100644 --- a/barrayvector-bones_8hpp_source.html +++ b/barrayvector-bones_8hpp_source.html @@ -232,7 +232,7 @@ diff --git a/barrayvector-meat_8hpp.html b/barrayvector-meat_8hpp.html index b83d77127..cc5268925 100644 --- a/barrayvector-meat_8hpp.html +++ b/barrayvector-meat_8hpp.html @@ -104,7 +104,7 @@ diff --git a/barrayvector-meat_8hpp_source.html b/barrayvector-meat_8hpp_source.html index 19ef82d03..7607c8b3f 100644 --- a/barrayvector-meat_8hpp_source.html +++ b/barrayvector-meat_8hpp_source.html @@ -444,7 +444,7 @@ diff --git a/barry-configuration_8hpp.html b/barry-configuration_8hpp.html index 2f1936f4f..ccb32880e 100644 --- a/barry-configuration_8hpp.html +++ b/barry-configuration_8hpp.html @@ -257,7 +257,7 @@

    - +
diff --git a/barry-configuration_8hpp_source.html b/barry-configuration_8hpp_source.html index f34631e43..b14b2f5af 100644 --- a/barry-configuration_8hpp_source.html +++ b/barry-configuration_8hpp_source.html @@ -160,7 +160,7 @@ diff --git a/barry-debug_8hpp.html b/barry-debug_8hpp.html index b2eef204c..01462d3b2 100644 --- a/barry-debug_8hpp.html +++ b/barry-debug_8hpp.html @@ -139,7 +139,7 @@

    - +
diff --git a/barry-debug_8hpp_source.html b/barry-debug_8hpp_source.html index 5d64e37ca..6103337f0 100644 --- a/barry-debug_8hpp_source.html +++ b/barry-debug_8hpp_source.html @@ -145,7 +145,7 @@ diff --git a/barry-macros_8hpp.html b/barry-macros_8hpp.html index 03143c31d..d9d13af74 100644 --- a/barry-macros_8hpp.html +++ b/barry-macros_8hpp.html @@ -236,7 +236,7 @@

    - +
diff --git a/barry-macros_8hpp_source.html b/barry-macros_8hpp_source.html index bdd535ab2..f8df17606 100644 --- a/barry-macros_8hpp_source.html +++ b/barry-macros_8hpp_source.html @@ -121,7 +121,7 @@ diff --git a/barry_8hpp.html b/barry_8hpp.html index 4279e205b..e02149431 100644 --- a/barry_8hpp.html +++ b/barry_8hpp.html @@ -401,7 +401,7 @@

    - +
diff --git a/barry_8hpp_source.html b/barry_8hpp_source.html index 248db3605..6bb490c9e 100644 --- a/barry_8hpp_source.html +++ b/barry_8hpp_source.html @@ -237,7 +237,7 @@ diff --git a/cell-bones_8hpp.html b/cell-bones_8hpp.html index 4ad2c11a1..5556a1770 100644 --- a/cell-bones_8hpp.html +++ b/cell-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/cell-bones_8hpp_source.html b/cell-bones_8hpp_source.html index 694b5a4a1..fc59faa09 100644 --- a/cell-bones_8hpp_source.html +++ b/cell-bones_8hpp_source.html @@ -159,7 +159,7 @@ diff --git a/cell-meat_8hpp.html b/cell-meat_8hpp.html index eaf04d106..b1874badf 100644 --- a/cell-meat_8hpp.html +++ b/cell-meat_8hpp.html @@ -113,7 +113,7 @@ diff --git a/cell-meat_8hpp_source.html b/cell-meat_8hpp_source.html index 42e0ff68a..c2ce2f166 100644 --- a/cell-meat_8hpp_source.html +++ b/cell-meat_8hpp_source.html @@ -180,7 +180,7 @@ diff --git a/class_b_array-members.html b/class_b_array-members.html index 700589d95..6c7d961fa 100644 --- a/class_b_array-members.html +++ b/class_b_array-members.html @@ -165,7 +165,7 @@ diff --git a/class_b_array.html b/class_b_array.html index f936a00fe..80a1348cb 100644 --- a/class_b_array.html +++ b/class_b_array.html @@ -2141,7 +2141,7 @@

    - +
diff --git a/class_b_array_cell-members.html b/class_b_array_cell-members.html index 1e67c36f2..c6eae52a9 100644 --- a/class_b_array_cell-members.html +++ b/class_b_array_cell-members.html @@ -113,7 +113,7 @@ diff --git a/class_b_array_cell.html b/class_b_array_cell.html index 7fa2eaa2e..22997ec84 100644 --- a/class_b_array_cell.html +++ b/class_b_array_cell.html @@ -430,7 +430,7 @@

    - +
diff --git a/class_b_array_cell__const-members.html b/class_b_array_cell__const-members.html index 9c825619e..e990fbe99 100644 --- a/class_b_array_cell__const-members.html +++ b/class_b_array_cell__const-members.html @@ -113,7 +113,7 @@ diff --git a/class_b_array_cell__const.html b/class_b_array_cell__const.html index 2b151fcc3..e5251a703 100644 --- a/class_b_array_cell__const.html +++ b/class_b_array_cell__const.html @@ -430,7 +430,7 @@

    - +
diff --git a/class_b_array_dense-members.html b/class_b_array_dense-members.html index 98a60b70e..bf542298b 100644 --- a/class_b_array_dense-members.html +++ b/class_b_array_dense-members.html @@ -170,7 +170,7 @@ diff --git a/class_b_array_dense.html b/class_b_array_dense.html index a18ffe2f0..b86d90663 100644 --- a/class_b_array_dense.html +++ b/class_b_array_dense.html @@ -641,7 +641,7 @@

-

Definition at line 905 of file barraydense-meat.hpp.

+

Definition at line 909 of file barraydense-meat.hpp.

@@ -681,7 +681,7 @@

-

Definition at line 498 of file barraydense-meat.hpp.

+

Definition at line 502 of file barraydense-meat.hpp.

@@ -721,7 +721,7 @@

-

Definition at line 484 of file barraydense-meat.hpp.

+

Definition at line 488 of file barraydense-meat.hpp.

@@ -751,7 +751,7 @@

-

Definition at line 1008 of file barraydense-meat.hpp.

+

Definition at line 1012 of file barraydense-meat.hpp.

@@ -881,7 +881,7 @@

-

Definition at line 571 of file barraydense-meat.hpp.

+

Definition at line 575 of file barraydense-meat.hpp.

@@ -1039,7 +1039,7 @@

-

Definition at line 998 of file barraydense-meat.hpp.

+

Definition at line 1002 of file barraydense-meat.hpp.

@@ -1069,7 +1069,7 @@

Entries is a class with three objects: Two std::vector with the row and column coordinates respectively, and one std::vector with the corresponding value of the cell.

Returns
Entries<Cell_Type>
-

Definition at line 510 of file barraydense-meat.hpp.

+

Definition at line 514 of file barraydense-meat.hpp.

@@ -1213,7 +1213,7 @@

-

Definition at line 697 of file barraydense-meat.hpp.

+

Definition at line 701 of file barraydense-meat.hpp.

@@ -1271,7 +1271,7 @@

-

Definition at line 663 of file barraydense-meat.hpp.

+

Definition at line 667 of file barraydense-meat.hpp.

@@ -1346,7 +1346,7 @@

-

Definition at line 539 of file barraydense-meat.hpp.

+

Definition at line 543 of file barraydense-meat.hpp.

@@ -1372,7 +1372,7 @@

-

Definition at line 556 of file barraydense-meat.hpp.

+

Definition at line 560 of file barraydense-meat.hpp.

@@ -1398,7 +1398,7 @@

-

Definition at line 560 of file barraydense-meat.hpp.

+

Definition at line 564 of file barraydense-meat.hpp.

@@ -1424,7 +1424,7 @@

-

Definition at line 552 of file barraydense-meat.hpp.

+

Definition at line 556 of file barraydense-meat.hpp.

@@ -1470,7 +1470,7 @@

-

Definition at line 615 of file barraydense-meat.hpp.

+

Definition at line 619 of file barraydense-meat.hpp.

@@ -1516,7 +1516,7 @@

-

Definition at line 626 of file barraydense-meat.hpp.

+

Definition at line 630 of file barraydense-meat.hpp.

@@ -1606,7 +1606,7 @@

-

Definition at line 576 of file barraydense-meat.hpp.

+

Definition at line 580 of file barraydense-meat.hpp.

@@ -1676,7 +1676,7 @@

-

Definition at line 595 of file barraydense-meat.hpp.

+

Definition at line 599 of file barraydense-meat.hpp.

@@ -1870,7 +1870,7 @@

-

Definition at line 964 of file barraydense-meat.hpp.

+

Definition at line 968 of file barraydense-meat.hpp.

@@ -1896,7 +1896,7 @@

-

Definition at line 955 of file barraydense-meat.hpp.

+

Definition at line 959 of file barraydense-meat.hpp.

@@ -1936,7 +1936,7 @@

-

Definition at line 919 of file barraydense-meat.hpp.

+

Definition at line 923 of file barraydense-meat.hpp.

@@ -1988,7 +1988,7 @@

-

Definition at line 640 of file barraydense-meat.hpp.

+

Definition at line 644 of file barraydense-meat.hpp.

@@ -2028,7 +2028,7 @@

-

Definition at line 470 of file barraydense-meat.hpp.

+

Definition at line 474 of file barraydense-meat.hpp.

@@ -2068,7 +2068,7 @@

-

Definition at line 457 of file barraydense-meat.hpp.

+

Definition at line 461 of file barraydense-meat.hpp.

@@ -2098,7 +2098,7 @@

-

Definition at line 1003 of file barraydense-meat.hpp.

+

Definition at line 1007 of file barraydense-meat.hpp.

@@ -2217,7 +2217,7 @@

-

Definition at line 728 of file barraydense-meat.hpp.

+

Definition at line 732 of file barraydense-meat.hpp.

@@ -2263,7 +2263,7 @@

-

Definition at line 812 of file barraydense-meat.hpp.

+

Definition at line 816 of file barraydense-meat.hpp.

@@ -2309,7 +2309,7 @@

-

Definition at line 784 of file barraydense-meat.hpp.

+

Definition at line 788 of file barraydense-meat.hpp.

@@ -2361,7 +2361,7 @@

-

Definition at line 765 of file barraydense-meat.hpp.

+

Definition at line 769 of file barraydense-meat.hpp.

@@ -2423,7 +2423,7 @@

-

Definition at line 877 of file barraydense-meat.hpp.

+

Definition at line 881 of file barraydense-meat.hpp.

@@ -2463,7 +2463,7 @@

-

Definition at line 858 of file barraydense-meat.hpp.

+

Definition at line 862 of file barraydense-meat.hpp.

@@ -2503,7 +2503,7 @@

-

Definition at line 839 of file barraydense-meat.hpp.

+

Definition at line 843 of file barraydense-meat.hpp.

@@ -2668,7 +2668,7 @@

    - +
diff --git a/class_b_array_dense_cell-members.html b/class_b_array_dense_cell-members.html index f08af7e44..e82316397 100644 --- a/class_b_array_dense_cell-members.html +++ b/class_b_array_dense_cell-members.html @@ -117,7 +117,7 @@ diff --git a/class_b_array_dense_cell.html b/class_b_array_dense_cell.html index 2654c6de7..be4e8a586 100644 --- a/class_b_array_dense_cell.html +++ b/class_b_array_dense_cell.html @@ -550,7 +550,7 @@

    - +
diff --git a/class_b_array_dense_cell__const.html b/class_b_array_dense_cell__const.html index 84fa78182..bfe5e7337 100644 --- a/class_b_array_dense_cell__const.html +++ b/class_b_array_dense_cell__const.html @@ -111,7 +111,7 @@ diff --git a/class_b_array_dense_col-members.html b/class_b_array_dense_col-members.html index 549bfc708..c4caf0e2c 100644 --- a/class_b_array_dense_col-members.html +++ b/class_b_array_dense_col-members.html @@ -112,7 +112,7 @@ diff --git a/class_b_array_dense_col.html b/class_b_array_dense_col.html index 03e93eaa7..100d6e5c0 100644 --- a/class_b_array_dense_col.html +++ b/class_b_array_dense_col.html @@ -379,7 +379,7 @@

    - +
diff --git a/class_b_array_dense_col__const-members.html b/class_b_array_dense_col__const-members.html index 84eb057b9..32cf13971 100644 --- a/class_b_array_dense_col__const-members.html +++ b/class_b_array_dense_col__const-members.html @@ -111,7 +111,7 @@ diff --git a/class_b_array_dense_col__const.html b/class_b_array_dense_col__const.html index 8d45fe3ed..0d2c5cb34 100644 --- a/class_b_array_dense_col__const.html +++ b/class_b_array_dense_col__const.html @@ -351,7 +351,7 @@

    - +
diff --git a/class_b_array_dense_row-members.html b/class_b_array_dense_row-members.html index 83b33a180..1a11db945 100644 --- a/class_b_array_dense_row-members.html +++ b/class_b_array_dense_row-members.html @@ -112,7 +112,7 @@ diff --git a/class_b_array_dense_row.html b/class_b_array_dense_row.html index 295bd1dfc..2dc326644 100644 --- a/class_b_array_dense_row.html +++ b/class_b_array_dense_row.html @@ -379,7 +379,7 @@

    - +
diff --git a/class_b_array_dense_row__const-members.html b/class_b_array_dense_row__const-members.html index 09d7565e5..34ef5e2ac 100644 --- a/class_b_array_dense_row__const-members.html +++ b/class_b_array_dense_row__const-members.html @@ -111,7 +111,7 @@ diff --git a/class_b_array_dense_row__const.html b/class_b_array_dense_row__const.html index 9437f1a48..e6cb99134 100644 --- a/class_b_array_dense_row__const.html +++ b/class_b_array_dense_row__const.html @@ -351,7 +351,7 @@

    - +
diff --git a/class_b_array_row-members.html b/class_b_array_row-members.html index 569351bcc..fc01de0ce 100644 --- a/class_b_array_row-members.html +++ b/class_b_array_row-members.html @@ -113,7 +113,7 @@ diff --git a/class_b_array_row.html b/class_b_array_row.html index 96b6d1b93..38bca1da9 100644 --- a/class_b_array_row.html +++ b/class_b_array_row.html @@ -354,7 +354,7 @@

    - +
diff --git a/class_b_array_row__const-members.html b/class_b_array_row__const-members.html index 8cc32ec7c..4d45105d6 100644 --- a/class_b_array_row__const-members.html +++ b/class_b_array_row__const-members.html @@ -113,7 +113,7 @@ diff --git a/class_b_array_row__const.html b/class_b_array_row__const.html index 73ea5d56d..c841b1dd9 100644 --- a/class_b_array_row__const.html +++ b/class_b_array_row__const.html @@ -354,7 +354,7 @@

    - +
diff --git a/class_b_array_vector-members.html b/class_b_array_vector-members.html index 74fbedbf1..f257b7f8a 100644 --- a/class_b_array_vector-members.html +++ b/class_b_array_vector-members.html @@ -118,7 +118,7 @@ diff --git a/class_b_array_vector.html b/class_b_array_vector.html index c019182d8..145738c11 100644 --- a/class_b_array_vector.html +++ b/class_b_array_vector.html @@ -585,7 +585,7 @@

    - +
diff --git a/class_b_array_vector__const-members.html b/class_b_array_vector__const-members.html index bbd6b2db7..982bb0e8b 100644 --- a/class_b_array_vector__const-members.html +++ b/class_b_array_vector__const-members.html @@ -118,7 +118,7 @@ diff --git a/class_b_array_vector__const.html b/class_b_array_vector__const.html index fa7775857..209a582f3 100644 --- a/class_b_array_vector__const.html +++ b/class_b_array_vector__const.html @@ -567,7 +567,7 @@

    - +
diff --git a/class_cell-members.html b/class_cell-members.html index 83ed9a168..e9581bea2 100644 --- a/class_cell-members.html +++ b/class_cell-members.html @@ -124,7 +124,7 @@ diff --git a/class_cell.html b/class_cell.html index d3762f6db..4cf2a2407 100644 --- a/class_cell.html +++ b/class_cell.html @@ -695,7 +695,7 @@

    - +
diff --git a/class_cell__const.html b/class_cell__const.html index 2f2d8954a..bd2a7f5bc 100644 --- a/class_cell__const.html +++ b/class_cell__const.html @@ -111,7 +111,7 @@ diff --git a/class_const_b_array_row_iter-members.html b/class_const_b_array_row_iter-members.html index 302327f84..495aab470 100644 --- a/class_const_b_array_row_iter-members.html +++ b/class_const_b_array_row_iter-members.html @@ -110,7 +110,7 @@ diff --git a/class_const_b_array_row_iter.html b/class_const_b_array_row_iter.html index 5f3f30207..707577c49 100644 --- a/class_const_b_array_row_iter.html +++ b/class_const_b_array_row_iter.html @@ -278,7 +278,7 @@

    - +
diff --git a/class_counter-members.html b/class_counter-members.html index c05d21928..e6b8c2679 100644 --- a/class_counter-members.html +++ b/class_counter-members.html @@ -123,7 +123,7 @@ diff --git a/class_counter.html b/class_counter.html index 0f0cda548..0dd13dc19 100644 --- a/class_counter.html +++ b/class_counter.html @@ -679,7 +679,7 @@

    - +
diff --git a/class_counters-members.html b/class_counters-members.html index 3a4db9981..7373bc1ea 100644 --- a/class_counters-members.html +++ b/class_counters-members.html @@ -118,7 +118,7 @@ diff --git a/class_counters.html b/class_counters.html index 1e78dd5b7..b7a07856c 100644 --- a/class_counters.html +++ b/class_counters.html @@ -573,7 +573,7 @@

    - +
diff --git a/class_d_e_f_m-members.html b/class_d_e_f_m-members.html index f2f00325a..492a8efe9 100644 --- a/class_d_e_f_m-members.html +++ b/class_d_e_f_m-members.html @@ -124,7 +124,7 @@ diff --git a/class_d_e_f_m.html b/class_d_e_f_m.html index 22768ddf0..9fb704ac5 100644 --- a/class_d_e_f_m.html +++ b/class_d_e_f_m.html @@ -811,7 +811,7 @@

    - +
diff --git a/class_d_e_f_m_counter_data-members.html b/class_d_e_f_m_counter_data-members.html index 83e252571..038205a0c 100644 --- a/class_d_e_f_m_counter_data-members.html +++ b/class_d_e_f_m_counter_data-members.html @@ -114,7 +114,7 @@ diff --git a/class_d_e_f_m_counter_data.html b/class_d_e_f_m_counter_data.html index 4e75168fb..ab6d8d64d 100644 --- a/class_d_e_f_m_counter_data.html +++ b/class_d_e_f_m_counter_data.html @@ -146,7 +146,7 @@ diff --git a/class_d_e_f_m_data-members.html b/class_d_e_f_m_data-members.html index 35dc31524..9512713e3 100644 --- a/class_d_e_f_m_data-members.html +++ b/class_d_e_f_m_data-members.html @@ -119,7 +119,7 @@ diff --git a/class_d_e_f_m_data.html b/class_d_e_f_m_data.html index a520a67fa..04c5f9c84 100644 --- a/class_d_e_f_m_data.html +++ b/class_d_e_f_m_data.html @@ -164,7 +164,7 @@ diff --git a/class_d_e_f_m_rule_data-members.html b/class_d_e_f_m_rule_data-members.html index df4ad642d..a37924971 100644 --- a/class_d_e_f_m_rule_data-members.html +++ b/class_d_e_f_m_rule_data-members.html @@ -114,7 +114,7 @@ diff --git a/class_d_e_f_m_rule_data.html b/class_d_e_f_m_rule_data.html index 1f012b8a7..1a48489e6 100644 --- a/class_d_e_f_m_rule_data.html +++ b/class_d_e_f_m_rule_data.html @@ -150,7 +150,7 @@ diff --git a/class_d_e_f_m_rule_dyn_data-members.html b/class_d_e_f_m_rule_dyn_data-members.html index 4b8078e48..214892adc 100644 --- a/class_d_e_f_m_rule_dyn_data-members.html +++ b/class_d_e_f_m_rule_dyn_data-members.html @@ -117,7 +117,7 @@ diff --git a/class_d_e_f_m_rule_dyn_data.html b/class_d_e_f_m_rule_dyn_data.html index 5db693881..e84e4c310 100644 --- a/class_d_e_f_m_rule_dyn_data.html +++ b/class_d_e_f_m_rule_dyn_data.html @@ -167,7 +167,7 @@ diff --git a/class_entries-members.html b/class_entries-members.html index 225d698f6..3dcab73d2 100644 --- a/class_entries-members.html +++ b/class_entries-members.html @@ -111,7 +111,7 @@ diff --git a/class_entries.html b/class_entries.html index 00a8fa588..7d27f3287 100644 --- a/class_entries.html +++ b/class_entries.html @@ -323,7 +323,7 @@

    - +
diff --git a/class_flock-members.html b/class_flock-members.html index 842cce0a4..f002b2b5d 100644 --- a/class_flock-members.html +++ b/class_flock-members.html @@ -130,7 +130,7 @@ diff --git a/class_flock.html b/class_flock.html index 386fe8cce..57cffb9fe 100644 --- a/class_flock.html +++ b/class_flock.html @@ -316,7 +316,7 @@

-

Definition at line 228 of file flock-meat.hpp.

+

Definition at line 250 of file flock-meat.hpp.

@@ -567,7 +567,7 @@

-

Definition at line 171 of file flock-meat.hpp.

+

Definition at line 193 of file flock-meat.hpp.

@@ -594,7 +594,7 @@

-

Definition at line 199 of file flock-meat.hpp.

+

Definition at line 221 of file flock-meat.hpp.

@@ -621,7 +621,7 @@

-

Definition at line 185 of file flock-meat.hpp.

+

Definition at line 207 of file flock-meat.hpp.

@@ -648,7 +648,7 @@

-

Definition at line 213 of file flock-meat.hpp.

+

Definition at line 235 of file flock-meat.hpp.

@@ -675,7 +675,7 @@

-

Definition at line 178 of file flock-meat.hpp.

+

Definition at line 200 of file flock-meat.hpp.

@@ -723,7 +723,7 @@

Returns
Geese*
-

Definition at line 306 of file flock-meat.hpp.

+

Definition at line 328 of file flock-meat.hpp.

@@ -763,7 +763,7 @@

Definition at line 235 of file flock-meat.hpp.

+

Definition at line 257 of file flock-meat.hpp.

@@ -790,7 +790,7 @@

-

Definition at line 262 of file flock-meat.hpp.

+

Definition at line 284 of file flock-meat.hpp.

@@ -853,7 +853,7 @@

-

Definition at line 221 of file flock-meat.hpp.

+

Definition at line 243 of file flock-meat.hpp.

@@ -948,7 +948,7 @@

    - +
diff --git a/class_freq_table-members.html b/class_freq_table-members.html index 5506540ee..3f753f116 100644 --- a/class_freq_table-members.html +++ b/class_freq_table-members.html @@ -115,7 +115,7 @@ diff --git a/class_freq_table.html b/class_freq_table.html index faadf385d..face04569 100644 --- a/class_freq_table.html +++ b/class_freq_table.html @@ -491,7 +491,7 @@

    - +
diff --git a/class_geese-members.html b/class_geese-members.html index 8191f677a..10154e758 100644 --- a/class_geese-members.html +++ b/class_geese-members.html @@ -159,7 +159,7 @@ diff --git a/class_geese.html b/class_geese.html index 4c97a3626..92a403053 100644 --- a/class_geese.html +++ b/class_geese.html @@ -1895,7 +1895,7 @@

    - +
diff --git a/class_model-members.html b/class_model-members.html index f8bfeb4db..b0db1df62 100644 --- a/class_model-members.html +++ b/class_model-members.html @@ -182,7 +182,7 @@ diff --git a/class_model.html b/class_model.html index 38b66a78c..f741d57d8 100644 --- a/class_model.html +++ b/class_model.html @@ -394,7 +394,7 @@

-

Definition at line 186 of file model-meat.hpp.

+

Definition at line 171 of file model-meat.hpp.

@@ -424,7 +424,7 @@

-

Definition at line 220 of file model-meat.hpp.

+

Definition at line 205 of file model-meat.hpp.

@@ -454,7 +454,7 @@

-

Definition at line 258 of file model-meat.hpp.

+

Definition at line 243 of file model-meat.hpp.

@@ -535,7 +535,7 @@

Returns
The number of the array.

When computing with the powerset, we need to grow the corresponding vectors on the fly

-

Definition at line 491 of file model-meat.hpp.

+

Definition at line 476 of file model-meat.hpp.

@@ -565,7 +565,7 @@

-

Definition at line 367 of file model-meat.hpp.

+

Definition at line 352 of file model-meat.hpp.

@@ -611,7 +611,7 @@

-

Definition at line 376 of file model-meat.hpp.

+

Definition at line 361 of file model-meat.hpp.

@@ -641,7 +641,7 @@

-

Definition at line 411 of file model-meat.hpp.

+

Definition at line 396 of file model-meat.hpp.

@@ -671,7 +671,7 @@

-

Definition at line 422 of file model-meat.hpp.

+

Definition at line 407 of file model-meat.hpp.

@@ -731,7 +731,7 @@

-

Definition at line 450 of file model-meat.hpp.

+

Definition at line 435 of file model-meat.hpp.

@@ -771,7 +771,7 @@

-

Definition at line 459 of file model-meat.hpp.

+

Definition at line 444 of file model-meat.hpp.

@@ -797,7 +797,7 @@

-

Definition at line 1146 of file model-meat.hpp.

+

Definition at line 1133 of file model-meat.hpp.

@@ -862,7 +862,7 @@

Returns
double The conditional probability
-

Definition at line 1411 of file model-meat.hpp.

+

Definition at line 1399 of file model-meat.hpp.

@@ -892,7 +892,7 @@

-

Definition at line 360 of file model-meat.hpp.

+

Definition at line 345 of file model-meat.hpp.

@@ -918,7 +918,7 @@

-

Definition at line 1482 of file model-meat.hpp.

+

Definition at line 1472 of file model-meat.hpp.

@@ -944,7 +944,7 @@

-

Definition at line 1449 of file model-meat.hpp.

+

Definition at line 1437 of file model-meat.hpp.

@@ -970,7 +970,7 @@

-

Definition at line 966 of file model-meat.hpp.

+

Definition at line 951 of file model-meat.hpp.

@@ -1000,7 +1000,7 @@

-

Definition at line 973 of file model-meat.hpp.

+

Definition at line 959 of file model-meat.hpp.

@@ -1026,7 +1026,7 @@

-

Definition at line 1488 of file model-meat.hpp.

+

Definition at line 1479 of file model-meat.hpp.

@@ -1052,7 +1052,7 @@

-

Definition at line 1498 of file model-meat.hpp.

+

Definition at line 1491 of file model-meat.hpp.

@@ -1080,7 +1080,7 @@

Definition at line 1493 of file model-meat.hpp.

+

Definition at line 1485 of file model-meat.hpp.

@@ -1110,7 +1110,7 @@

-

Definition at line 986 of file model-meat.hpp.

+

Definition at line 973 of file model-meat.hpp.

@@ -1136,7 +1136,7 @@

-

Definition at line 1444 of file model-meat.hpp.

+

Definition at line 1432 of file model-meat.hpp.

@@ -1162,7 +1162,7 @@

-

Definition at line 1454 of file model-meat.hpp.

+

Definition at line 1442 of file model-meat.hpp.

@@ -1188,7 +1188,7 @@

-

Definition at line 1459 of file model-meat.hpp.

+

Definition at line 1447 of file model-meat.hpp.

@@ -1214,7 +1214,7 @@

-

Definition at line 1476 of file model-meat.hpp.

+

Definition at line 1465 of file model-meat.hpp.

@@ -1243,7 +1243,7 @@

Definition at line 1470 of file model-meat.hpp.

+

Definition at line 1458 of file model-meat.hpp.

@@ -1269,7 +1269,7 @@

-

Definition at line 1465 of file model-meat.hpp.

+

Definition at line 1453 of file model-meat.hpp.

@@ -1327,7 +1327,7 @@

-

Definition at line 672 of file model-meat.hpp.

+

Definition at line 657 of file model-meat.hpp.

@@ -1385,7 +1385,7 @@

-

Definition at line 818 of file model-meat.hpp.

+

Definition at line 803 of file model-meat.hpp.

@@ -1437,7 +1437,7 @@

-

Definition at line 627 of file model-meat.hpp.

+

Definition at line 612 of file model-meat.hpp.

@@ -1495,7 +1495,7 @@

-

Definition at line 754 of file model-meat.hpp.

+

Definition at line 739 of file model-meat.hpp.

@@ -1547,7 +1547,7 @@

-

Definition at line 888 of file model-meat.hpp.

+

Definition at line 873 of file model-meat.hpp.

@@ -1573,7 +1573,7 @@

-

Definition at line 1117 of file model-meat.hpp.

+

Definition at line 1104 of file model-meat.hpp.

@@ -1599,7 +1599,7 @@

-

Definition at line 1125 of file model-meat.hpp.

+

Definition at line 1112 of file model-meat.hpp.

@@ -1625,7 +1625,7 @@

-

Definition at line 1106 of file model-meat.hpp.

+

Definition at line 1093 of file model-meat.hpp.

@@ -1655,7 +1655,7 @@

-

Definition at line 302 of file model-meat.hpp.

+

Definition at line 287 of file model-meat.hpp.

@@ -1683,7 +1683,7 @@

Definition at line 1028 of file model-meat.hpp.

+

Definition at line 1015 of file model-meat.hpp.

@@ -1713,7 +1713,7 @@

-

Definition at line 998 of file model-meat.hpp.

+

Definition at line 985 of file model-meat.hpp.

@@ -1754,7 +1754,7 @@

When computing with the powerset, we need to grow the corresponding vectors on the fly

-

Definition at line 1242 of file model-meat.hpp.

+

Definition at line 1230 of file model-meat.hpp.

@@ -1794,7 +1794,7 @@

-

Definition at line 1162 of file model-meat.hpp.

+

Definition at line 1150 of file model-meat.hpp.

@@ -1824,7 +1824,7 @@

-

Definition at line 393 of file model-meat.hpp.

+

Definition at line 378 of file model-meat.hpp.

@@ -1894,7 +1894,7 @@

-

Definition at line 432 of file model-meat.hpp.

+

Definition at line 417 of file model-meat.hpp.

@@ -1924,7 +1924,7 @@

-

Definition at line 474 of file model-meat.hpp.

+

Definition at line 459 of file model-meat.hpp.

@@ -2006,7 +2006,7 @@

Definition at line 1503 of file model-meat.hpp.

+

Definition at line 1497 of file model-meat.hpp.

@@ -2032,7 +2032,7 @@

-

Definition at line 1089 of file model-meat.hpp.

+

Definition at line 1076 of file model-meat.hpp.

@@ -2058,7 +2058,7 @@

-

Definition at line 1097 of file model-meat.hpp.

+

Definition at line 1084 of file model-meat.hpp.

@@ -2084,7 +2084,7 @@

-

Definition at line 352 of file model-meat.hpp.

+

Definition at line 337 of file model-meat.hpp.

@@ -2110,7 +2110,7 @@

-

Definition at line 1133 of file model-meat.hpp.

+

Definition at line 1120 of file model-meat.hpp.

@@ -2173,7 +2173,7 @@

Definition at line 149 of file model-meat.hpp.

+

Definition at line 134 of file model-meat.hpp.

@@ -2837,7 +2837,7 @@

    - +
diff --git a/class_net_counter_data-members.html b/class_net_counter_data-members.html index edd30bb45..bd2cf9c05 100644 --- a/class_net_counter_data-members.html +++ b/class_net_counter_data-members.html @@ -109,7 +109,7 @@ diff --git a/class_net_counter_data.html b/class_net_counter_data.html index 284ca535d..9fdf6adc2 100644 --- a/class_net_counter_data.html +++ b/class_net_counter_data.html @@ -261,7 +261,7 @@

    - +
diff --git a/class_network_data-members.html b/class_network_data-members.html index cd7ae1f34..108e7baf6 100644 --- a/class_network_data-members.html +++ b/class_network_data-members.html @@ -110,7 +110,7 @@ diff --git a/class_network_data.html b/class_network_data.html index a6b7db4d9..784fde5f6 100644 --- a/class_network_data.html +++ b/class_network_data.html @@ -323,7 +323,7 @@

    - +
diff --git a/class_node-members.html b/class_node-members.html index 4e3e79e23..386a90eb2 100644 --- a/class_node-members.html +++ b/class_node-members.html @@ -125,7 +125,7 @@ diff --git a/class_node.html b/class_node.html index 6f212530d..3a8e35e71 100644 --- a/class_node.html +++ b/class_node.html @@ -687,7 +687,7 @@

    - +
diff --git a/class_node_data-members.html b/class_node_data-members.html index 3d6e4c0da..a82122be6 100644 --- a/class_node_data-members.html +++ b/class_node_data-members.html @@ -108,7 +108,7 @@ diff --git a/class_node_data.html b/class_node_data.html index 4e7bb3758..15bcac1f4 100644 --- a/class_node_data.html +++ b/class_node_data.html @@ -230,7 +230,7 @@

    - +
diff --git a/class_phylo_counter_data-members.html b/class_phylo_counter_data-members.html index e3f270139..a4d318dab 100644 --- a/class_phylo_counter_data-members.html +++ b/class_phylo_counter_data-members.html @@ -117,7 +117,7 @@ diff --git a/class_phylo_counter_data.html b/class_phylo_counter_data.html index e585c02bc..7a2dd866d 100644 --- a/class_phylo_counter_data.html +++ b/class_phylo_counter_data.html @@ -512,7 +512,7 @@

    - +
diff --git a/class_phylo_rule_dyn_data-members.html b/class_phylo_rule_dyn_data-members.html index a2d7f77dd..b238e66c8 100644 --- a/class_phylo_rule_dyn_data-members.html +++ b/class_phylo_rule_dyn_data-members.html @@ -112,7 +112,7 @@ diff --git a/class_phylo_rule_dyn_data.html b/class_phylo_rule_dyn_data.html index e97b26586..b5b5d781f 100644 --- a/class_phylo_rule_dyn_data.html +++ b/class_phylo_rule_dyn_data.html @@ -330,7 +330,7 @@

    - +
diff --git a/class_power_set-members.html b/class_power_set-members.html index 63ec5e31a..33934b450 100644 --- a/class_power_set-members.html +++ b/class_power_set-members.html @@ -129,7 +129,7 @@ diff --git a/class_power_set.html b/class_power_set.html index 0ad95d316..a47573bc0 100644 --- a/class_power_set.html +++ b/class_power_set.html @@ -845,7 +845,7 @@

    - +
diff --git a/class_progress-members.html b/class_progress-members.html index 405fe0a97..d72f322af 100644 --- a/class_progress-members.html +++ b/class_progress-members.html @@ -108,7 +108,7 @@ diff --git a/class_progress.html b/class_progress.html index 5c721eaab..8dc89d3bd 100644 --- a/class_progress.html +++ b/class_progress.html @@ -250,7 +250,7 @@

    - +
diff --git a/class_rule-members.html b/class_rule-members.html index b53fca91e..3b1c941f9 100644 --- a/class_rule-members.html +++ b/class_rule-members.html @@ -113,7 +113,7 @@ diff --git a/class_rule.html b/class_rule.html index 32744a058..68abaff64 100644 --- a/class_rule.html +++ b/class_rule.html @@ -452,7 +452,7 @@

    - +
diff --git a/class_rules-members.html b/class_rules-members.html index edaa33ed2..8e8a2da94 100644 --- a/class_rules-members.html +++ b/class_rules-members.html @@ -117,7 +117,7 @@ diff --git a/class_rules.html b/class_rules.html index c19ea34f4..560e2fe12 100644 --- a/class_rules.html +++ b/class_rules.html @@ -617,7 +617,7 @@

    - +
diff --git a/class_stats_counter-members.html b/class_stats_counter-members.html index 48e01e755..ecaa0dd9e 100644 --- a/class_stats_counter-members.html +++ b/class_stats_counter-members.html @@ -118,7 +118,7 @@ diff --git a/class_stats_counter.html b/class_stats_counter.html index fdf30c304..d41af5663 100644 --- a/class_stats_counter.html +++ b/class_stats_counter.html @@ -519,7 +519,7 @@

    - +
diff --git a/class_support-members.html b/class_support-members.html index ccc9c635f..b012ddae7 100644 --- a/class_support-members.html +++ b/class_support-members.html @@ -143,7 +143,7 @@ diff --git a/class_support.html b/class_support.html index 867f1ec40..7d4665ef9 100644 --- a/class_support.html +++ b/class_support.html @@ -394,7 +394,7 @@

-

Definition at line 416 of file support-meat.hpp.

+

Definition at line 417 of file support-meat.hpp.

@@ -424,7 +424,7 @@

-

Definition at line 443 of file support-meat.hpp.

+

Definition at line 444 of file support-meat.hpp.

@@ -454,7 +454,7 @@

-

Definition at line 453 of file support-meat.hpp.

+

Definition at line 454 of file support-meat.hpp.

@@ -484,7 +484,7 @@

-

Definition at line 478 of file support-meat.hpp.

+

Definition at line 479 of file support-meat.hpp.

@@ -514,7 +514,7 @@

-

Definition at line 488 of file support-meat.hpp.

+

Definition at line 489 of file support-meat.hpp.

@@ -570,7 +570,7 @@

Definition at line 382 of file support-meat.hpp.

+

Definition at line 383 of file support-meat.hpp.

@@ -616,7 +616,7 @@

-

Definition at line 513 of file support-meat.hpp.

+

Definition at line 514 of file support-meat.hpp.

@@ -644,7 +644,7 @@

Definition at line 593 of file support-meat.hpp.

+

Definition at line 594 of file support-meat.hpp.

@@ -670,7 +670,7 @@

-

Definition at line 557 of file support-meat.hpp.

+

Definition at line 558 of file support-meat.hpp.

@@ -698,7 +698,7 @@

Definition at line 571 of file support-meat.hpp.

+

Definition at line 572 of file support-meat.hpp.

@@ -724,7 +724,7 @@

-

Definition at line 588 of file support-meat.hpp.

+

Definition at line 589 of file support-meat.hpp.

@@ -752,7 +752,7 @@

Definition at line 598 of file support-meat.hpp.

+

Definition at line 599 of file support-meat.hpp.

@@ -780,7 +780,7 @@

Definition at line 603 of file support-meat.hpp.

+

Definition at line 604 of file support-meat.hpp.

@@ -846,7 +846,7 @@

-

Definition at line 576 of file support-meat.hpp.

+

Definition at line 577 of file support-meat.hpp.

@@ -932,7 +932,7 @@

-

Definition at line 426 of file support-meat.hpp.

+

Definition at line 427 of file support-meat.hpp.

@@ -962,7 +962,7 @@

-

Definition at line 463 of file support-meat.hpp.

+

Definition at line 464 of file support-meat.hpp.

@@ -992,7 +992,7 @@

-

Definition at line 498 of file support-meat.hpp.

+

Definition at line 499 of file support-meat.hpp.

@@ -1277,7 +1277,7 @@

    - +
diff --git a/classes.html b/classes.html index 4f8c5be22..da4cfae56 100644 --- a/classes.html +++ b/classes.html @@ -140,7 +140,7 @@ diff --git a/col-bones_8hpp.html b/col-bones_8hpp.html index 53b616cce..494bace12 100644 --- a/col-bones_8hpp.html +++ b/col-bones_8hpp.html @@ -104,7 +104,7 @@ diff --git a/col-bones_8hpp_source.html b/col-bones_8hpp_source.html index 1addbbe19..62d41cd36 100644 --- a/col-bones_8hpp_source.html +++ b/col-bones_8hpp_source.html @@ -159,7 +159,7 @@ diff --git a/counters-bones_8hpp.html b/counters-bones_8hpp.html index 4e1fd5cfe..c138e36fa 100644 --- a/counters-bones_8hpp.html +++ b/counters-bones_8hpp.html @@ -125,7 +125,7 @@ diff --git a/counters-bones_8hpp_source.html b/counters-bones_8hpp_source.html index 0c785cb92..ee4f3a4ff 100644 --- a/counters-bones_8hpp_source.html +++ b/counters-bones_8hpp_source.html @@ -258,7 +258,7 @@ diff --git a/counters-meat_8hpp.html b/counters-meat_8hpp.html index fa3f18d36..f2858b2e4 100644 --- a/counters-meat_8hpp.html +++ b/counters-meat_8hpp.html @@ -1560,7 +1560,7 @@

    - +
diff --git a/counters-meat_8hpp_source.html b/counters-meat_8hpp_source.html index 8abc1f018..ebea4232a 100644 --- a/counters-meat_8hpp_source.html +++ b/counters-meat_8hpp_source.html @@ -417,7 +417,7 @@ diff --git a/defm-bones_8hpp.html b/defm-bones_8hpp.html index 9e992cfe7..f711b3cb4 100644 --- a/defm-bones_8hpp.html +++ b/defm-bones_8hpp.html @@ -121,7 +121,7 @@ diff --git a/defm-bones_8hpp_source.html b/defm-bones_8hpp_source.html index dee2c8a2c..082bc043f 100644 --- a/defm-bones_8hpp_source.html +++ b/defm-bones_8hpp_source.html @@ -216,7 +216,7 @@ diff --git a/defm-meat_8hpp.html b/defm-meat_8hpp.html index ab69414aa..0f3800792 100644 --- a/defm-meat_8hpp.html +++ b/defm-meat_8hpp.html @@ -212,7 +212,7 @@

    - +
diff --git a/defm-meat_8hpp_source.html b/defm-meat_8hpp_source.html index 4cf3a86d1..98c8ee06c 100644 --- a/defm-meat_8hpp_source.html +++ b/defm-meat_8hpp_source.html @@ -592,7 +592,7 @@ diff --git a/defm-types_8hpp.html b/defm-types_8hpp.html index 690455771..d37a7c3b2 100644 --- a/defm-types_8hpp.html +++ b/defm-types_8hpp.html @@ -171,7 +171,7 @@

    - +
diff --git a/defm-types_8hpp_source.html b/defm-types_8hpp_source.html index b80751cfe..2efa033d9 100644 --- a/defm-types_8hpp_source.html +++ b/defm-types_8hpp_source.html @@ -305,7 +305,7 @@ diff --git a/defm_2counters_8hpp.html b/defm_2counters_8hpp.html index 5f4556100..b7cc1f9c3 100644 --- a/defm_2counters_8hpp.html +++ b/defm_2counters_8hpp.html @@ -326,7 +326,7 @@

    - +
diff --git a/defm_2counters_8hpp_source.html b/defm_2counters_8hpp_source.html index a2d70e0f5..d2b5a03b3 100644 --- a/defm_2counters_8hpp_source.html +++ b/defm_2counters_8hpp_source.html @@ -794,7 +794,7 @@ diff --git a/defm_8hpp.html b/defm_8hpp.html index 1a38684d3..6312a2fbc 100644 --- a/defm_8hpp.html +++ b/defm_8hpp.html @@ -133,7 +133,7 @@ diff --git a/defm_8hpp_source.html b/defm_8hpp_source.html index 26ede0547..5705b19a5 100644 --- a/defm_8hpp_source.html +++ b/defm_8hpp_source.html @@ -126,7 +126,7 @@ diff --git a/dir_000001_000002.html b/dir_000001_000002.html index cbc2c6ff9..50176777f 100644 --- a/dir_000001_000002.html +++ b/dir_000001_000002.html @@ -98,7 +98,7 @@

barry → counters Relation

diff --git a/dir_000003_000004.html b/dir_000003_000004.html index d9d4d646f..eef901828 100644 --- a/dir_000003_000004.html +++ b/dir_000003_000004.html @@ -98,7 +98,7 @@

models → defm Relation

    - +
diff --git a/dir_000003_000005.html b/dir_000003_000005.html index 3bfbf4dfe..782c1ebfe 100644 --- a/dir_000003_000005.html +++ b/dir_000003_000005.html @@ -98,7 +98,7 @@

models → geese Relation

    - +
diff --git a/dir_488ec4010567cc6d95c62bdcb57a6d3e.html b/dir_488ec4010567cc6d95c62bdcb57a6d3e.html index ae0d67e4a..e70b8c474 100644 --- a/dir_488ec4010567cc6d95c62bdcb57a6d3e.html +++ b/dir_488ec4010567cc6d95c62bdcb57a6d3e.html @@ -130,7 +130,7 @@ diff --git a/dir_6e63e3665115632dc5d61b2d6d6c3354.html b/dir_6e63e3665115632dc5d61b2d6d6c3354.html index a8b7b2270..3fba341a5 100644 --- a/dir_6e63e3665115632dc5d61b2d6d6c3354.html +++ b/dir_6e63e3665115632dc5d61b2d6d6c3354.html @@ -203,7 +203,7 @@ diff --git a/dir_b3150c389b0f5b078392750f1ae70361.html b/dir_b3150c389b0f5b078392750f1ae70361.html index 42eb187a0..4ebd6a315 100644 --- a/dir_b3150c389b0f5b078392750f1ae70361.html +++ b/dir_b3150c389b0f5b078392750f1ae70361.html @@ -110,7 +110,7 @@ diff --git a/dir_c5954a04c87570f0664da134464d5428.html b/dir_c5954a04c87570f0664da134464d5428.html index d9a9284e1..36076f873 100644 --- a/dir_c5954a04c87570f0664da134464d5428.html +++ b/dir_c5954a04c87570f0664da134464d5428.html @@ -134,7 +134,7 @@ diff --git a/dir_d44c64559bbebec7f509842c48db8b23.html b/dir_d44c64559bbebec7f509842c48db8b23.html index ef3fbe383..c19fabea3 100644 --- a/dir_d44c64559bbebec7f509842c48db8b23.html +++ b/dir_d44c64559bbebec7f509842c48db8b23.html @@ -117,7 +117,7 @@ diff --git a/dir_d7a554d3e09ed8456d56450fe8436947.html b/dir_d7a554d3e09ed8456d56450fe8436947.html index 99fd7d18f..1a6917db3 100644 --- a/dir_d7a554d3e09ed8456d56450fe8436947.html +++ b/dir_d7a554d3e09ed8456d56450fe8436947.html @@ -116,7 +116,7 @@ diff --git a/files.html b/files.html index 9ab84bd3f..dafe248e6 100644 --- a/files.html +++ b/files.html @@ -173,7 +173,7 @@ diff --git a/flock-bones_8hpp.html b/flock-bones_8hpp.html index 37af51bdc..b5a9d758b 100644 --- a/flock-bones_8hpp.html +++ b/flock-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/flock-bones_8hpp_source.html b/flock-bones_8hpp_source.html index af2191f03..a12c59672 100644 --- a/flock-bones_8hpp_source.html +++ b/flock-bones_8hpp_source.html @@ -161,27 +161,27 @@
A Flock is a group of Geese.
Definition: flock-bones.hpp:14
PhyloModel model
Definition: flock-bones.hpp:23
std::mt19937 rengine
Definition: flock-bones.hpp:22
-
std::vector< std::string > colnames() const
Definition: flock-meat.hpp:228
+
std::vector< std::string > colnames() const
Definition: flock-meat.hpp:250
PhyloCounters * get_counters()
Definition: flock-meat.hpp:100
void set_seed(const size_t &s)
Set the seed of the model.
Definition: flock-meat.hpp:42
std::vector< std::vector< double > > * get_stats_target()
Definition: flock-meat.hpp:124
-
size_t nfuns() const noexcept
Definition: flock-meat.hpp:171
-
size_t parse_polytomies(bool verb=true, std::vector< size_t > *dist=nullptr) const noexcept
Check polytomies and return the largest.
Definition: flock-meat.hpp:235
-
void print() const
Definition: flock-meat.hpp:262
+
size_t nfuns() const noexcept
Definition: flock-meat.hpp:193
+
size_t parse_polytomies(bool verb=true, std::vector< size_t > *dist=nullptr) const noexcept
Check polytomies and return the largest.
Definition: flock-meat.hpp:257
+
void print() const
Definition: flock-meat.hpp:284
void init(size_t bar_width=BARRY_PROGRESS_BAR_WIDTH)
Definition: flock-meat.hpp:49
size_t add_data(std::vector< std::vector< size_t > > &annotations, std::vector< size_t > &geneid, std::vector< int > &parent, std::vector< bool > &duplication)
Add a tree to the flock.
Definition: flock-meat.hpp:6
-
std::vector< size_t > nleafs() const noexcept
Definition: flock-meat.hpp:199
-
size_t nterms() const
Definition: flock-meat.hpp:213
+
std::vector< size_t > nleafs() const noexcept
Definition: flock-meat.hpp:221
+
size_t nterms() const
Definition: flock-meat.hpp:235
PhyloModel * get_model()
Definition: flock-meat.hpp:131
bool initialized
Definition: flock-bones.hpp:19
std::vector< std::vector< double > > * get_stats_support()
Definition: flock-meat.hpp:117
-
size_t support_size() const noexcept
Definition: flock-meat.hpp:221
+
size_t support_size() const noexcept
Definition: flock-meat.hpp:243
double likelihood_joint(const std::vector< double > &par, bool as_log=false, bool use_reduced_sequence=true, size_t ncores=1u)
Returns the joint likelihood of the model.
Definition: flock-meat.hpp:138
PhyloSupport * get_support_fun()
Definition: flock-meat.hpp:110
-
std::vector< size_t > nnodes() const noexcept
Definition: flock-meat.hpp:185
-
size_t ntrees() const noexcept
Definition: flock-meat.hpp:178
+
std::vector< size_t > nnodes() const noexcept
Definition: flock-meat.hpp:207
+
size_t ntrees() const noexcept
Definition: flock-meat.hpp:200
std::vector< Geese > dat
Definition: flock-bones.hpp:17
size_t nfunctions
Definition: flock-bones.hpp:18
Annotated Phylo Model.
@@ -197,7 +197,7 @@ diff --git a/flock-meat_8hpp.html b/flock-meat_8hpp.html index 5dc1d91be..04756ff68 100644 --- a/flock-meat_8hpp.html +++ b/flock-meat_8hpp.html @@ -113,7 +113,7 @@ diff --git a/flock-meat_8hpp_source.html b/flock-meat_8hpp_source.html index cb3689b83..ace2d0fbe 100644 --- a/flock-meat_8hpp_source.html +++ b/flock-meat_8hpp_source.html @@ -248,193 +248,215 @@
150  std::vector< double > par0(par.begin(), par.end() - nfunctions);
151  model.update_normalizing_constants(par0, ncores);
152 
-
153  if (as_log) {
-
154 
-
155  for (auto& d : this->dat)
-
156  ans += d.likelihood(par, as_log, use_reduced_sequence, ncores, true);
-
157 
-
158  }
-
159  else
-
160  {
-
161 
-
162  for (auto& d : this->dat)
-
163  ans *= d.likelihood(par, as_log, use_reduced_sequence, ncores, true);
-
164 
-
165  }
-
166 
-
167  return ans;
-
168 
-
169 }
+
153  // Figuring out core distribution
+
154  size_t nsubcores = ncores > 2u ? ncores - 2u : 1u;
+
155  ncores = ncores - nsubcores;
+
156 
+
157  if (as_log) {
+
158 
+
159  if (ncores > 1u)
+
160  {
+
161  #if defined(_OPENMP) || defined(__OPENMP)
+
162  #pragma omp parallel for reduction(+:ans) num_threads(ncores)
+
163  #endif
+
164  for (auto& d : this->dat)
+
165  ans += d.likelihood(par, as_log, use_reduced_sequence, nsubcores, true);
+
166  } else {
+
167  for (auto& d : this->dat)
+
168  ans += d.likelihood(par, as_log, use_reduced_sequence, nsubcores, true);
+
169  }
170 
-
171 inline size_t Flock::nfuns() const noexcept
-
172 {
-
173 
-
174  return this->nfunctions;
-
175 
-
176 }
-
177 
-
178 inline size_t Flock::ntrees() const noexcept
-
179 {
-
180 
-
181  return this->dat.size();
-
182 
-
183 }
-
184 
-
185 inline std::vector< size_t > Flock::nnodes() const noexcept
-
186 {
-
187 
-
188  std::vector< size_t > res;
-
189 
-
190  res.reserve(this->ntrees());
-
191 
-
192  for (const auto& d : dat)
-
193  res.push_back(d.nnodes());
-
194 
-
195  return res;
-
196 
-
197 }
-
198 
-
199 inline std::vector< size_t > Flock::nleafs() const noexcept
-
200 {
-
201 
-
202  std::vector< size_t > res;
-
203 
-
204  res.reserve(this->ntrees());
-
205 
-
206  for (const auto& d : dat)
-
207  res.push_back(d.nleafs());
-
208 
-
209  return res;
-
210 
-
211 }
-
212 
-
213 inline size_t Flock::nterms() const
-
214 {
-
215 
-
216  INITIALIZED()
-
217  return model.nterms() + this->nfuns();
+
171  }
+
172  else
+
173  {
+
174 
+
175  if (ncores > 1u)
+
176  {
+
177  #if defined(_OPENMP) || defined(__OPENMP)
+
178  #pragma omp parallel for reduction(*:ans) num_threads(ncores)
+
179  #endif
+
180  for (auto& d : this->dat)
+
181  ans *= d.likelihood(par, as_log, use_reduced_sequence, nsubcores, true);
+
182  } else {
+
183  for (auto& d : this->dat)
+
184  ans *= d.likelihood(par, as_log, use_reduced_sequence, nsubcores, true);
+
185  }
+
186 
+
187  }
+
188 
+
189  return ans;
+
190 
+
191 }
+
192 
+
193 inline size_t Flock::nfuns() const noexcept
+
194 {
+
195 
+
196  return this->nfunctions;
+
197 
+
198 }
+
199 
+
200 inline size_t Flock::ntrees() const noexcept
+
201 {
+
202 
+
203  return this->dat.size();
+
204 
+
205 }
+
206 
+
207 inline std::vector< size_t > Flock::nnodes() const noexcept
+
208 {
+
209 
+
210  std::vector< size_t > res;
+
211 
+
212  res.reserve(this->ntrees());
+
213 
+
214  for (const auto& d : dat)
+
215  res.push_back(d.nnodes());
+
216 
+
217  return res;
218 
219 }
220 
-
221 inline size_t Flock::support_size() const noexcept
+
221 inline std::vector< size_t > Flock::nleafs() const noexcept
222 {
223 
-
224  return this->model.support_size();
+
224  std::vector< size_t > res;
225 
-
226 }
+
226  res.reserve(this->ntrees());
227 
-
228 inline std::vector< std::string > Flock::colnames() const
-
229 {
+
228  for (const auto& d : dat)
+
229  res.push_back(d.nleafs());
230 
-
231  return this->model.colnames();
+
231  return res;
232 
233 }
234 
- -
236  bool verb,
-
237  std::vector< size_t > * dist
-
238 ) const noexcept
-
239 {
+
235 inline size_t Flock::nterms() const
+
236 {
+
237 
+
238  INITIALIZED()
+
239  return model.nterms() + this->nfuns();
240 
-
241  size_t ans = 0;
+
241 }
242 
-
243  int i = 0;
-
244 
-
245  for (const auto & d : dat)
-
246  {
+
243 inline size_t Flock::support_size() const noexcept
+
244 {
+
245 
+
246  return this->model.support_size();
247 
-
248  if (verb)
-
249  printf_barry("Checking tree %i\n", i);
-
250 
-
251  size_t tmp = d.parse_polytomies(verb, dist);
+
248 }
+
249 
+
250 inline std::vector< std::string > Flock::colnames() const
+
251 {
252 
-
253  if (tmp > ans)
-
254  ans = tmp;
-
255 
-
256  }
-
257 
-
258  return ans;
-
259 
-
260 }
-
261 
-
262 inline void Flock::print() const
-
263 {
+
253  return this->model.colnames();
+
254 
+
255 }
+
256 
+ +
258  bool verb,
+
259  std::vector< size_t > * dist
+
260 ) const noexcept
+
261 {
+
262 
+
263  size_t ans = 0;
264 
-
265  // Information relevant to print:
-
266  // - Number of phylogenies
-
267  // - Number of functions
-
268  // - Total number of annotations.
+
265  int i = 0;
+
266 
+
267  for (const auto & d : dat)
+
268  {
269 
-
270  // Computing total number of annotations and events
-
271  size_t nzeros = 0u;
+
270  if (verb)
+
271  printf_barry("Checking tree %i\n", i);
272 
-
273  size_t nones = 0u;
+
273  size_t tmp = d.parse_polytomies(verb, dist);
274 
-
275  size_t ndpl = 0u;
-
276 
-
277  size_t nspe = 0u;
-
278 
-
279  for (const auto & tree : this->dat)
-
280  {
-
281  nzeros += tree.n_zeros;
-
282  nones += tree.n_ones;
-
283  ndpl += tree.n_dupl_events;
-
284  nspe += tree.n_spec_events;
-
285 
-
286  }
-
287 
-
288  printf_barry("FLOCK (GROUP OF GEESE)\nINFO ABOUT THE PHYLOGENIES\n");
-
289 
-
290  printf_barry("# of phylogenies : %li\n", ntrees());
-
291 
-
292  printf_barry("# of functions : %li\n", nfuns());
-
293 
-
294  printf_barry("# of ann. [zeros; ones] : [%li; %li]\n", nzeros, nones);
-
295 
-
296  printf_barry("# of events [dupl; spec] : [%li; %li]\n", ndpl, nspe);
-
297 
-
298  printf_barry("Largest polytomy : %li\n", parse_polytomies(false));
-
299 
-
300  printf_barry("\nINFO ABOUT THE SUPPORT\n");
-
301 
-
302  return this->model.print();
-
303 
-
304 }
-
305 
-
306 inline Geese* Flock::operator()(size_t i, bool check_bounds)
-
307 {
-
308 
-
309  if (check_bounds && i >= ntrees())
-
310  throw std::logic_error("Geese not found in the flock (out of range).");
-
311 
-
312  return &dat[i];
-
313 
-
314 }
-
315 
-
316 #endif
+
275  if (tmp > ans)
+
276  ans = tmp;
+
277 
+
278  }
+
279 
+
280  return ans;
+
281 
+
282 }
+
283 
+
284 inline void Flock::print() const
+
285 {
+
286 
+
287  // Information relevant to print:
+
288  // - Number of phylogenies
+
289  // - Number of functions
+
290  // - Total number of annotations.
+
291 
+
292  // Computing total number of annotations and events
+
293  size_t nzeros = 0u;
+
294 
+
295  size_t nones = 0u;
+
296 
+
297  size_t ndpl = 0u;
+
298 
+
299  size_t nspe = 0u;
+
300 
+
301  for (const auto & tree : this->dat)
+
302  {
+
303  nzeros += tree.n_zeros;
+
304  nones += tree.n_ones;
+
305  ndpl += tree.n_dupl_events;
+
306  nspe += tree.n_spec_events;
+
307 
+
308  }
+
309 
+
310  printf_barry("FLOCK (GROUP OF GEESE)\nINFO ABOUT THE PHYLOGENIES\n");
+
311 
+
312  printf_barry("# of phylogenies : %li\n", ntrees());
+
313 
+
314  printf_barry("# of functions : %li\n", nfuns());
+
315 
+
316  printf_barry("# of ann. [zeros; ones] : [%li; %li]\n", nzeros, nones);
+
317 
+
318  printf_barry("# of events [dupl; spec] : [%li; %li]\n", ndpl, nspe);
+
319 
+
320  printf_barry("Largest polytomy : %li\n", parse_polytomies(false));
+
321 
+
322  printf_barry("\nINFO ABOUT THE SUPPORT\n");
+
323 
+
324  return this->model.print();
+
325 
+
326 }
+
327 
+
328 inline Geese* Flock::operator()(size_t i, bool check_bounds)
+
329 {
+
330 
+
331  if (check_bounds && i >= ntrees())
+
332  throw std::logic_error("Geese not found in the flock (out of range).");
+
333 
+
334  return &dat[i];
+
335 
+
336 }
+
337 
+
338 #endif
#define printf_barry
-
Geese * operator()(size_t i, bool check_bounds=true)
Access the i-th geese element.
Definition: flock-meat.hpp:306
+
Geese * operator()(size_t i, bool check_bounds=true)
Access the i-th geese element.
Definition: flock-meat.hpp:328
PhyloModel model
Definition: flock-bones.hpp:23
std::mt19937 rengine
Definition: flock-bones.hpp:22
-
std::vector< std::string > colnames() const
Definition: flock-meat.hpp:228
+
std::vector< std::string > colnames() const
Definition: flock-meat.hpp:250
PhyloCounters * get_counters()
Definition: flock-meat.hpp:100
void set_seed(const size_t &s)
Set the seed of the model.
Definition: flock-meat.hpp:42
std::vector< std::vector< double > > * get_stats_target()
Definition: flock-meat.hpp:124
-
size_t nfuns() const noexcept
Definition: flock-meat.hpp:171
-
size_t parse_polytomies(bool verb=true, std::vector< size_t > *dist=nullptr) const noexcept
Check polytomies and return the largest.
Definition: flock-meat.hpp:235
-
void print() const
Definition: flock-meat.hpp:262
+
size_t nfuns() const noexcept
Definition: flock-meat.hpp:193
+
size_t parse_polytomies(bool verb=true, std::vector< size_t > *dist=nullptr) const noexcept
Check polytomies and return the largest.
Definition: flock-meat.hpp:257
+
void print() const
Definition: flock-meat.hpp:284
void init(size_t bar_width=BARRY_PROGRESS_BAR_WIDTH)
Definition: flock-meat.hpp:49
size_t add_data(std::vector< std::vector< size_t > > &annotations, std::vector< size_t > &geneid, std::vector< int > &parent, std::vector< bool > &duplication)
Add a tree to the flock.
Definition: flock-meat.hpp:6
-
std::vector< size_t > nleafs() const noexcept
Definition: flock-meat.hpp:199
-
size_t nterms() const
Definition: flock-meat.hpp:213
+
std::vector< size_t > nleafs() const noexcept
Definition: flock-meat.hpp:221
+
size_t nterms() const
Definition: flock-meat.hpp:235
PhyloModel * get_model()
Definition: flock-meat.hpp:131
bool initialized
Definition: flock-bones.hpp:19
std::vector< std::vector< double > > * get_stats_support()
Definition: flock-meat.hpp:117
-
size_t support_size() const noexcept
Definition: flock-meat.hpp:221
+
size_t support_size() const noexcept
Definition: flock-meat.hpp:243
double likelihood_joint(const std::vector< double > &par, bool as_log=false, bool use_reduced_sequence=true, size_t ncores=1u)
Returns the joint likelihood of the model.
Definition: flock-meat.hpp:138
PhyloSupport * get_support_fun()
Definition: flock-meat.hpp:110
-
std::vector< size_t > nnodes() const noexcept
Definition: flock-meat.hpp:185
-
size_t ntrees() const noexcept
Definition: flock-meat.hpp:178
+
std::vector< size_t > nnodes() const noexcept
Definition: flock-meat.hpp:207
+
size_t ntrees() const noexcept
Definition: flock-meat.hpp:200
std::vector< Geese > dat
Definition: flock-bones.hpp:17
size_t nfunctions
Definition: flock-bones.hpp:18
Annotated Phylo Model.
@@ -452,7 +474,7 @@ diff --git a/formula_8hpp.html b/formula_8hpp.html index d97efad94..cb6c53aac 100644 --- a/formula_8hpp.html +++ b/formula_8hpp.html @@ -206,7 +206,7 @@

Transition effects

diff --git a/formula_8hpp_source.html b/formula_8hpp_source.html index 0116c66e2..65ba6ce02 100644 --- a/formula_8hpp_source.html +++ b/formula_8hpp_source.html @@ -288,7 +288,7 @@ diff --git a/freqtable_8hpp.html b/freqtable_8hpp.html index e0cda6176..ddee2663b 100644 --- a/freqtable_8hpp.html +++ b/freqtable_8hpp.html @@ -122,7 +122,7 @@ diff --git a/freqtable_8hpp_source.html b/freqtable_8hpp_source.html index 14e72b272..6919642e4 100644 --- a/freqtable_8hpp_source.html +++ b/freqtable_8hpp_source.html @@ -356,7 +356,7 @@ diff --git a/functions.html b/functions.html index 1853a8ea0..642f3a780 100644 --- a/functions.html +++ b/functions.html @@ -159,7 +159,7 @@

- a -

    diff --git a/functions_b.html b/functions_b.html index 610d45f40..e014c8d69 100644 --- a/functions_b.html +++ b/functions_b.html @@ -192,7 +192,7 @@

    - b -

      diff --git a/functions_c.html b/functions_c.html index c4d5b919a..713cea8ff 100644 --- a/functions_c.html +++ b/functions_c.html @@ -203,7 +203,7 @@

      - c -

        diff --git a/functions_d.html b/functions_d.html index 8e3c71ea2..5362e9b9c 100644 --- a/functions_d.html +++ b/functions_d.html @@ -166,7 +166,7 @@

        - d -

          diff --git a/functions_e.html b/functions_e.html index 32211de3a..d145622cb 100644 --- a/functions_e.html +++ b/functions_e.html @@ -137,7 +137,7 @@

          - e -

            diff --git a/functions_f.html b/functions_f.html index 0139c1c6f..ffe903315 100644 --- a/functions_f.html +++ b/functions_f.html @@ -113,7 +113,7 @@

            - f -

              diff --git a/functions_func.html b/functions_func.html index e41532f42..313c4fe99 100644 --- a/functions_func.html +++ b/functions_func.html @@ -140,7 +140,7 @@

              - a -

                diff --git a/functions_func_b.html b/functions_func_b.html index 79567888f..9a64bab62 100644 --- a/functions_func_b.html +++ b/functions_func_b.html @@ -151,7 +151,7 @@

                - b -

                  diff --git a/functions_func_c.html b/functions_func_c.html index 2e76abf30..35add8d54 100644 --- a/functions_func_c.html +++ b/functions_func_c.html @@ -155,7 +155,7 @@

                  - c -

                    diff --git a/functions_func_d.html b/functions_func_d.html index d8fb9cea2..5530fa777 100644 --- a/functions_func_d.html +++ b/functions_func_d.html @@ -129,7 +129,7 @@

                    - d -

                      diff --git a/functions_func_e.html b/functions_func_e.html index 0c6bd1b00..cff912fdc 100644 --- a/functions_func_e.html +++ b/functions_func_e.html @@ -122,7 +122,7 @@

                      - e -

                        diff --git a/functions_func_f.html b/functions_func_f.html index e14fb3aab..8586c1751 100644 --- a/functions_func_f.html +++ b/functions_func_f.html @@ -110,7 +110,7 @@

                        - f -

                          diff --git a/functions_func_g.html b/functions_func_g.html index c6437ded6..48c81ddee 100644 --- a/functions_func_g.html +++ b/functions_func_g.html @@ -272,7 +272,7 @@

                          - g -

                            diff --git a/functions_func_i.html b/functions_func_i.html index 74874b7df..2508fda4a 100644 --- a/functions_func_i.html +++ b/functions_func_i.html @@ -151,7 +151,7 @@

                            - i -

                              diff --git a/functions_func_l.html b/functions_func_l.html index 99cc6b5b9..6daa2b9d6 100644 --- a/functions_func_l.html +++ b/functions_func_l.html @@ -117,7 +117,7 @@

                              - l -

                                diff --git a/functions_func_m.html b/functions_func_m.html index 46ef373d1..d62df7e01 100644 --- a/functions_func_m.html +++ b/functions_func_m.html @@ -110,7 +110,7 @@

                                - m -

                                  diff --git a/functions_func_n.html b/functions_func_n.html index 2e6f0c645..726aead42 100644 --- a/functions_func_n.html +++ b/functions_func_n.html @@ -166,7 +166,7 @@

                                  - n -

                                    diff --git a/functions_func_o.html b/functions_func_o.html index ae308ca0b..69c686d66 100644 --- a/functions_func_o.html +++ b/functions_func_o.html @@ -228,7 +228,7 @@

                                    - o -

                                      diff --git a/functions_func_p.html b/functions_func_p.html index 3e1e04b1a..49d046feb 100644 --- a/functions_func_p.html +++ b/functions_func_p.html @@ -158,7 +158,7 @@

                                      - p -

                                        diff --git a/functions_func_r.html b/functions_func_r.html index 46d3be400..acdf9f375 100644 --- a/functions_func_r.html +++ b/functions_func_r.html @@ -136,7 +136,7 @@

                                        - r -

                                          diff --git a/functions_func_s.html b/functions_func_s.html index d449f25ea..e583383cc 100644 --- a/functions_func_s.html +++ b/functions_func_s.html @@ -189,7 +189,7 @@

                                          - s -

                                            diff --git a/functions_func_t.html b/functions_func_t.html index 9fcc9a12c..25b1ac93f 100644 --- a/functions_func_t.html +++ b/functions_func_t.html @@ -116,7 +116,7 @@

                                            - t -

                                              diff --git a/functions_func_u.html b/functions_func_u.html index 29ae6b628..8057ce09c 100644 --- a/functions_func_u.html +++ b/functions_func_u.html @@ -107,7 +107,7 @@

                                              - u -

                                                diff --git a/functions_func_z.html b/functions_func_z.html index 82f5214f6..48c108b0d 100644 --- a/functions_func_z.html +++ b/functions_func_z.html @@ -109,7 +109,7 @@

                                                - z -

                                                  diff --git a/functions_func_~.html b/functions_func_~.html index 519885685..b61df24d3 100644 --- a/functions_func_~.html +++ b/functions_func_~.html @@ -194,7 +194,7 @@

                                                  - ~ -

                                                    diff --git a/functions_g.html b/functions_g.html index 98481c0a1..54e2e7e1b 100644 --- a/functions_g.html +++ b/functions_g.html @@ -272,7 +272,7 @@

                                                    - g -

                                                      diff --git a/functions_h.html b/functions_h.html index e082d1a87..edca85484 100644 --- a/functions_h.html +++ b/functions_h.html @@ -110,7 +110,7 @@

                                                      - h -

                                                        diff --git a/functions_i.html b/functions_i.html index 9c4a1157d..d199e8c4e 100644 --- a/functions_i.html +++ b/functions_i.html @@ -171,7 +171,7 @@

                                                        - i -

                                                          diff --git a/functions_k.html b/functions_k.html index e5dc4d3c2..29f1c4b60 100644 --- a/functions_k.html +++ b/functions_k.html @@ -104,7 +104,7 @@

                                                          - k -

                                                            diff --git a/functions_l.html b/functions_l.html index ba0b5f65d..b09a92e2c 100644 --- a/functions_l.html +++ b/functions_l.html @@ -124,7 +124,7 @@

                                                            - l -

                                                              diff --git a/functions_m.html b/functions_m.html index 0bfb35704..9700d3f2f 100644 --- a/functions_m.html +++ b/functions_m.html @@ -123,7 +123,7 @@

                                                              - m -

                                                                diff --git a/functions_n.html b/functions_n.html index f48e0e614..b167d19a3 100644 --- a/functions_n.html +++ b/functions_n.html @@ -200,7 +200,7 @@

                                                                - n -

                                                                  diff --git a/functions_o.html b/functions_o.html index dede3a74f..12031a488 100644 --- a/functions_o.html +++ b/functions_o.html @@ -237,7 +237,7 @@

                                                                  - o -

                                                                    diff --git a/functions_p.html b/functions_p.html index 670b3c2e3..9080c8bf3 100644 --- a/functions_p.html +++ b/functions_p.html @@ -182,7 +182,7 @@

                                                                    - p -

                                                                      diff --git a/functions_r.html b/functions_r.html index 1ae8e7034..b405289c9 100644 --- a/functions_r.html +++ b/functions_r.html @@ -153,7 +153,7 @@

                                                                      - r -

                                                                        diff --git a/functions_rela.html b/functions_rela.html index 445f78545..9e54d606a 100644 --- a/functions_rela.html +++ b/functions_rela.html @@ -137,7 +137,7 @@ diff --git a/functions_s.html b/functions_s.html index 053c2b69f..5166d8a91 100644 --- a/functions_s.html +++ b/functions_s.html @@ -213,7 +213,7 @@

                                                                        - s -

                                                                          diff --git a/functions_t.html b/functions_t.html index f92fc3dae..c1eaaefdc 100644 --- a/functions_t.html +++ b/functions_t.html @@ -125,7 +125,7 @@

                                                                          - t -

                                                                            diff --git a/functions_u.html b/functions_u.html index 076c72873..c9aa5fa81 100644 --- a/functions_u.html +++ b/functions_u.html @@ -110,7 +110,7 @@

                                                                            - u -

                                                                              diff --git a/functions_v.html b/functions_v.html index 4af26512e..9cc8cc643 100644 --- a/functions_v.html +++ b/functions_v.html @@ -116,7 +116,7 @@

                                                                              - v -

                                                                                diff --git a/functions_vars.html b/functions_vars.html index c92444ddd..1f094771a 100644 --- a/functions_vars.html +++ b/functions_vars.html @@ -506,7 +506,7 @@

                                                                                - x -

                                                                                  diff --git a/functions_w.html b/functions_w.html index 995de46f6..3bda7efd2 100644 --- a/functions_w.html +++ b/functions_w.html @@ -104,7 +104,7 @@

                                                                                  - w -

                                                                                    diff --git a/functions_x.html b/functions_x.html index 63d1c946f..697a02519 100644 --- a/functions_x.html +++ b/functions_x.html @@ -107,7 +107,7 @@

                                                                                    - x -

                                                                                      diff --git a/functions_z.html b/functions_z.html index 06bd281d2..7233dc701 100644 --- a/functions_z.html +++ b/functions_z.html @@ -109,7 +109,7 @@

                                                                                      - z -

                                                                                        diff --git a/functions_~.html b/functions_~.html index 2b2912066..f514c2a05 100644 --- a/functions_~.html +++ b/functions_~.html @@ -194,7 +194,7 @@

                                                                                        - ~ -

                                                                                          diff --git a/geese-bones_8hpp.html b/geese-bones_8hpp.html index f8a9add1d..bc82f50b4 100644 --- a/geese-bones_8hpp.html +++ b/geese-bones_8hpp.html @@ -291,7 +291,7 @@

                                                                                            - +
                                                                                          diff --git a/geese-bones_8hpp_source.html b/geese-bones_8hpp_source.html index 90dc0a913..2583aee46 100644 --- a/geese-bones_8hpp_source.html +++ b/geese-bones_8hpp_source.html @@ -404,7 +404,7 @@ diff --git a/geese-meat-constructors_8hpp.html b/geese-meat-constructors_8hpp.html index c48e501b5..286347e4a 100644 --- a/geese-meat-constructors_8hpp.html +++ b/geese-meat-constructors_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat-constructors_8hpp_source.html b/geese-meat-constructors_8hpp_source.html index f3c5b1f3a..41013409b 100644 --- a/geese-meat-constructors_8hpp_source.html +++ b/geese-meat-constructors_8hpp_source.html @@ -484,7 +484,7 @@ diff --git a/geese-meat-likelihood_8hpp.html b/geese-meat-likelihood_8hpp.html index 6f0063e9d..17a362533 100644 --- a/geese-meat-likelihood_8hpp.html +++ b/geese-meat-likelihood_8hpp.html @@ -230,7 +230,7 @@

                                                                                          diff --git a/geese-meat-likelihood_8hpp_source.html b/geese-meat-likelihood_8hpp_source.html index 553ed936d..9c586ad6c 100644 --- a/geese-meat-likelihood_8hpp_source.html +++ b/geese-meat-likelihood_8hpp_source.html @@ -269,7 +269,7 @@
                                                                                          171  std::vector< std::vector< size_t > > & locations = pset_loc[support_id];
                                                                                          172 
                                                                                          173  // Making sure parallelization makes sense
                                                                                          -
                                                                                          174  if (psets.size() < 1000)
                                                                                          +
                                                                                          174  if (psets.size() < 128)
                                                                                          175  ncores = 1u;
                                                                                          176 
                                                                                          177  // Summation over all possible values of X
                                                                                          @@ -377,14 +377,14 @@
                                                                                          #define INITIALIZED()
                                                                                          Definition: geese-bones.hpp:22
                                                                                          void pset_loop(size_t n, size_t s, size_t nfunctions, const size_t node_id, double norm_const_i, std::vector< double > &totprob_n, const std::vector< double > &par0, const std::vector< std::vector< bool >> &states, const std::vector< PhyloArray > &psets, const std::vector< double > &psets_stats, const std::vector< std::vector< size_t > > &locations, const std::vector< geese::Node * > &node_offspring)
                                                                                          -
                                                                                          double likelihood_(const double *stats_target, const std::vector< double > &params, const double normalizing_constant, size_t n_params, bool log_=false)
                                                                                          Definition: model-meat.hpp:90
                                                                                          +
                                                                                          double likelihood_(const double *stats_target, const std::vector< double > &params, const double normalizing_constant, size_t n_params, bool log_=false)
                                                                                          Definition: model-meat.hpp:71
                                                                                          diff --git a/geese-meat-likelihood__exhaust_8hpp.html b/geese-meat-likelihood__exhaust_8hpp.html index eba8c8427..f01882293 100644 --- a/geese-meat-likelihood__exhaust_8hpp.html +++ b/geese-meat-likelihood__exhaust_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat-likelihood__exhaust_8hpp_source.html b/geese-meat-likelihood__exhaust_8hpp_source.html index f0ebf5905..d510ac611 100644 --- a/geese-meat-likelihood__exhaust_8hpp_source.html +++ b/geese-meat-likelihood__exhaust_8hpp_source.html @@ -247,7 +247,7 @@ diff --git a/geese-meat-predict_8hpp.html b/geese-meat-predict_8hpp.html index 40bcf65bb..9ece1b9f7 100644 --- a/geese-meat-predict_8hpp.html +++ b/geese-meat-predict_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat-predict_8hpp_source.html b/geese-meat-predict_8hpp_source.html index 53bb8da46..370b79aea 100644 --- a/geese-meat-predict_8hpp_source.html +++ b/geese-meat-predict_8hpp_source.html @@ -505,7 +505,7 @@ diff --git a/geese-meat-predict__exhaust_8hpp.html b/geese-meat-predict__exhaust_8hpp.html index 9c23975ce..d859386ce 100644 --- a/geese-meat-predict__exhaust_8hpp.html +++ b/geese-meat-predict__exhaust_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat-predict__exhaust_8hpp_source.html b/geese-meat-predict__exhaust_8hpp_source.html index 50491237d..15ee3d379 100644 --- a/geese-meat-predict__exhaust_8hpp_source.html +++ b/geese-meat-predict__exhaust_8hpp_source.html @@ -294,7 +294,7 @@ diff --git a/geese-meat-predict__sim_8hpp.html b/geese-meat-predict__sim_8hpp.html index 11d47f78d..752fd3040 100644 --- a/geese-meat-predict__sim_8hpp.html +++ b/geese-meat-predict__sim_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat-predict__sim_8hpp_source.html b/geese-meat-predict__sim_8hpp_source.html index 903e507c3..0a1976bc5 100644 --- a/geese-meat-predict__sim_8hpp_source.html +++ b/geese-meat-predict__sim_8hpp_source.html @@ -218,7 +218,7 @@ diff --git a/geese-meat-simulate_8hpp.html b/geese-meat-simulate_8hpp.html index 8082b83dd..efc291c9f 100644 --- a/geese-meat-simulate_8hpp.html +++ b/geese-meat-simulate_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat-simulate_8hpp_source.html b/geese-meat-simulate_8hpp_source.html index 44f805a7f..119a76c65 100644 --- a/geese-meat-simulate_8hpp_source.html +++ b/geese-meat-simulate_8hpp_source.html @@ -207,7 +207,7 @@ diff --git a/geese-meat_8hpp.html b/geese-meat_8hpp.html index 2cf7ed667..22abe6c3c 100644 --- a/geese-meat_8hpp.html +++ b/geese-meat_8hpp.html @@ -113,7 +113,7 @@ diff --git a/geese-meat_8hpp_source.html b/geese-meat_8hpp_source.html index 5c5d5b04b..3cb67a845 100644 --- a/geese-meat_8hpp_source.html +++ b/geese-meat_8hpp_source.html @@ -987,7 +987,7 @@ diff --git a/geese-node-bones_8hpp.html b/geese-node-bones_8hpp.html index 9a695ff66..347c7b746 100644 --- a/geese-node-bones_8hpp.html +++ b/geese-node-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/geese-node-bones_8hpp_source.html b/geese-node-bones_8hpp_source.html index 5394de21a..7827361f5 100644 --- a/geese-node-bones_8hpp_source.html +++ b/geese-node-bones_8hpp_source.html @@ -225,7 +225,7 @@ diff --git a/geese-types_8hpp.html b/geese-types_8hpp.html index 6cbacb61e..6a0524ac8 100644 --- a/geese-types_8hpp.html +++ b/geese-types_8hpp.html @@ -384,7 +384,7 @@

                                                                                            - +
                                                                                          diff --git a/geese-types_8hpp_source.html b/geese-types_8hpp_source.html index 571b8c7a8..171195923 100644 --- a/geese-types_8hpp_source.html +++ b/geese-types_8hpp_source.html @@ -283,7 +283,7 @@ diff --git a/geese_2counters_8hpp.html b/geese_2counters_8hpp.html index f4613f775..e101201d5 100644 --- a/geese_2counters_8hpp.html +++ b/geese_2counters_8hpp.html @@ -215,7 +215,7 @@ diff --git a/geese_2counters_8hpp_source.html b/geese_2counters_8hpp_source.html index 0217a7436..07ffb927d 100644 --- a/geese_2counters_8hpp_source.html +++ b/geese_2counters_8hpp_source.html @@ -2148,7 +2148,7 @@ diff --git a/geese_8hpp.html b/geese_8hpp.html index 2d5a02e94..df8166a8d 100644 --- a/geese_8hpp.html +++ b/geese_8hpp.html @@ -148,7 +148,7 @@ diff --git a/geese_8hpp_source.html b/geese_8hpp_source.html index 70a39fa41..8f8fd08f0 100644 --- a/geese_8hpp_source.html +++ b/geese_8hpp_source.html @@ -146,7 +146,7 @@ diff --git a/globals.html b/globals.html index 86c906562..35073f8ea 100644 --- a/globals.html +++ b/globals.html @@ -104,7 +104,7 @@

                                                                                          - a -

                                                                                            diff --git a/globals_b.html b/globals_b.html index f6cbad9e6..bbcccc0cd 100644 --- a/globals_b.html +++ b/globals_b.html @@ -185,7 +185,7 @@

                                                                                            - b -

                                                                                              diff --git a/globals_c.html b/globals_c.html index 349c49c7b..d541428c5 100644 --- a/globals_c.html +++ b/globals_c.html @@ -390,7 +390,7 @@

                                                                                              - c -

                                                                                                diff --git a/globals_d.html b/globals_d.html index d4f9f8d33..6858e3c80 100644 --- a/globals_d.html +++ b/globals_d.html @@ -167,7 +167,7 @@

                                                                                                - d -

                                                                                                  diff --git a/globals_defs.html b/globals_defs.html index 355d7da00..712890927 100644 --- a/globals_defs.html +++ b/globals_defs.html @@ -417,7 +417,7 @@

                                                                                                  - z -

                                                                                                    diff --git a/globals_e.html b/globals_e.html index 8f99540b8..c7baed9fb 100644 --- a/globals_e.html +++ b/globals_e.html @@ -104,7 +104,7 @@

                                                                                                    - e -

                                                                                                      diff --git a/globals_f.html b/globals_f.html index e6f66ebf2..730e402f7 100644 --- a/globals_f.html +++ b/globals_f.html @@ -115,7 +115,7 @@

                                                                                                      - f -

                                                                                                        diff --git a/globals_func.html b/globals_func.html index 370b71ba9..639535677 100644 --- a/globals_func.html +++ b/globals_func.html @@ -478,7 +478,7 @@

                                                                                                        - v -

                                                                                                          diff --git a/globals_g.html b/globals_g.html index 814494d6b..57a140c13 100644 --- a/globals_g.html +++ b/globals_g.html @@ -104,7 +104,7 @@

                                                                                                          - g -

                                                                                                            diff --git a/globals_h.html b/globals_h.html index 4353d1340..d984c267b 100644 --- a/globals_h.html +++ b/globals_h.html @@ -113,7 +113,7 @@

                                                                                                            - h -

                                                                                                              diff --git a/globals_i.html b/globals_i.html index 2d1213514..bceeb2cf4 100644 --- a/globals_i.html +++ b/globals_i.html @@ -131,7 +131,7 @@

                                                                                                              - i -

                                                                                                                diff --git a/globals_j.html b/globals_j.html index 41f0dfdaa..65060632b 100644 --- a/globals_j.html +++ b/globals_j.html @@ -105,7 +105,7 @@

                                                                                                                - j -

                                                                                                                  diff --git a/globals_k.html b/globals_k.html index cd662e269..e247b48c8 100644 --- a/globals_k.html +++ b/globals_k.html @@ -107,7 +107,7 @@

                                                                                                                  - k -

                                                                                                                    diff --git a/globals_l.html b/globals_l.html index 8e93e3650..83bafcf76 100644 --- a/globals_l.html +++ b/globals_l.html @@ -104,7 +104,7 @@

                                                                                                                    - l -

                                                                                                                      diff --git a/globals_m.html b/globals_m.html index e9d74c507..d01756277 100644 --- a/globals_m.html +++ b/globals_m.html @@ -113,7 +113,7 @@

                                                                                                                      - m -

                                                                                                                        diff --git a/globals_n.html b/globals_n.html index cc561480b..899fb18dc 100644 --- a/globals_n.html +++ b/globals_n.html @@ -158,7 +158,7 @@

                                                                                                                        - n -

                                                                                                                          diff --git a/globals_o.html b/globals_o.html index 4cdc66249..17c81c18f 100644 --- a/globals_o.html +++ b/globals_o.html @@ -104,7 +104,7 @@

                                                                                                                          - o -

                                                                                                                            diff --git a/globals_p.html b/globals_p.html index f9277f0b8..91d8096e9 100644 --- a/globals_p.html +++ b/globals_p.html @@ -167,7 +167,7 @@

                                                                                                                            - p -

                                                                                                                              diff --git a/globals_r.html b/globals_r.html index 71dce6519..1a39ecc3b 100644 --- a/globals_r.html +++ b/globals_r.html @@ -148,7 +148,7 @@

                                                                                                                              - r -

                                                                                                                                diff --git a/globals_s.html b/globals_s.html index b017aa84a..e67233bcd 100644 --- a/globals_s.html +++ b/globals_s.html @@ -113,7 +113,7 @@

                                                                                                                                - s -

                                                                                                                                  diff --git a/globals_t.html b/globals_t.html index 714a072cc..11d43ba5a 100644 --- a/globals_t.html +++ b/globals_t.html @@ -107,7 +107,7 @@

                                                                                                                                  - t -

                                                                                                                                    diff --git a/globals_type.html b/globals_type.html index 5c877a952..19599ba19 100644 --- a/globals_type.html +++ b/globals_type.html @@ -242,7 +242,7 @@

                                                                                                                                    - r -

                                                                                                                                      diff --git a/globals_u.html b/globals_u.html index b1eec028d..24edb7367 100644 --- a/globals_u.html +++ b/globals_u.html @@ -107,7 +107,7 @@

                                                                                                                                      - u -

                                                                                                                                        diff --git a/globals_v.html b/globals_v.html index e72f1da5c..759b9fcd3 100644 --- a/globals_v.html +++ b/globals_v.html @@ -116,7 +116,7 @@

                                                                                                                                        - v -

                                                                                                                                          diff --git a/globals_vars.html b/globals_vars.html index 967b0e78a..5f95146cd 100644 --- a/globals_vars.html +++ b/globals_vars.html @@ -174,7 +174,7 @@ diff --git a/globals_z.html b/globals_z.html index 5e8c03edd..9ad418e8c 100644 --- a/globals_z.html +++ b/globals_z.html @@ -106,7 +106,7 @@

                                                                                                                                          - z -

                                                                                                                                            diff --git a/graph_legend.html b/graph_legend.html index 626cf9d94..a89dada8d 100644 --- a/graph_legend.html +++ b/graph_legend.html @@ -161,7 +161,7 @@ diff --git a/group__counters-network.html b/group__counters-network.html index e1805bf10..b5b921664 100644 --- a/group__counters-network.html +++ b/group__counters-network.html @@ -1698,7 +1698,7 @@

                                                                                                                                            diff --git a/group__counters-phylo.html b/group__counters-phylo.html index c3c37ec76..a00e6c5a2 100644 --- a/group__counters-phylo.html +++ b/group__counters-phylo.html @@ -1334,7 +1334,7 @@

                                                                                                                                            diff --git a/group__counting.html b/group__counting.html index a35209c2e..286bd6306 100644 --- a/group__counting.html +++ b/group__counting.html @@ -1632,7 +1632,7 @@

                                                                                                                                            diff --git a/group__rules-phylo.html b/group__rules-phylo.html index 12a75817d..52774173e 100644 --- a/group__rules-phylo.html +++ b/group__rules-phylo.html @@ -1465,7 +1465,7 @@

                                                                                                                                            diff --git a/group__stat-models.html b/group__stat-models.html index d0b4ea0ee..55131788b 100644 --- a/group__stat-models.html +++ b/group__stat-models.html @@ -121,7 +121,7 @@ diff --git a/hierarchy.html b/hierarchy.html index e6ef3ae52..435274f0a 100644 --- a/hierarchy.html +++ b/hierarchy.html @@ -161,7 +161,7 @@ diff --git a/index.html b/index.html index 0d7e8bed0..42038766d 100644 --- a/index.html +++ b/index.html @@ -206,7 +206,7 @@

                                                                                                                                            Code of Conduct

                                                                                                                                            diff --git a/inherits.html b/inherits.html index e381ef011..c5d08195c 100644 --- a/inherits.html +++ b/inherits.html @@ -367,7 +367,7 @@ diff --git a/latex/barray-bones_8hpp__dep__incl.pdf b/latex/barray-bones_8hpp__dep__incl.pdf index 0e1b1230a..4b514a98e 100644 Binary files a/latex/barray-bones_8hpp__dep__incl.pdf and b/latex/barray-bones_8hpp__dep__incl.pdf differ diff --git a/latex/barray-meat-operators_8hpp__dep__incl.pdf b/latex/barray-meat-operators_8hpp__dep__incl.pdf index b7d4c331c..8faac8586 100644 Binary files a/latex/barray-meat-operators_8hpp__dep__incl.pdf and b/latex/barray-meat-operators_8hpp__dep__incl.pdf differ diff --git a/latex/barray-meat_8hpp__dep__incl.pdf b/latex/barray-meat_8hpp__dep__incl.pdf index c3e4223c0..5a55f12c9 100644 Binary files a/latex/barray-meat_8hpp__dep__incl.pdf and b/latex/barray-meat_8hpp__dep__incl.pdf differ diff --git a/latex/barraycell-bones_8hpp__dep__incl.pdf b/latex/barraycell-bones_8hpp__dep__incl.pdf index 240a2aa10..6f8db1fff 100644 Binary files a/latex/barraycell-bones_8hpp__dep__incl.pdf and b/latex/barraycell-bones_8hpp__dep__incl.pdf differ diff --git a/latex/barraycell-meat_8hpp__dep__incl.pdf b/latex/barraycell-meat_8hpp__dep__incl.pdf index 1177b533c..478e44210 100644 Binary files a/latex/barraycell-meat_8hpp__dep__incl.pdf and b/latex/barraycell-meat_8hpp__dep__incl.pdf differ diff --git a/latex/barraydense-bones_8hpp__dep__incl.pdf b/latex/barraydense-bones_8hpp__dep__incl.pdf index 254b9df58..8a710f9a7 100644 Binary files a/latex/barraydense-bones_8hpp__dep__incl.pdf and b/latex/barraydense-bones_8hpp__dep__incl.pdf differ diff --git a/latex/barraydense-meat-operators_8hpp__dep__incl.pdf b/latex/barraydense-meat-operators_8hpp__dep__incl.pdf index 54d3ee975..d8300121e 100644 Binary files a/latex/barraydense-meat-operators_8hpp__dep__incl.pdf and b/latex/barraydense-meat-operators_8hpp__dep__incl.pdf differ diff --git a/latex/barraydense-meat_8hpp__dep__incl.pdf b/latex/barraydense-meat_8hpp__dep__incl.pdf index 8043d56ab..7ef4472bd 100644 Binary files a/latex/barraydense-meat_8hpp__dep__incl.pdf and b/latex/barraydense-meat_8hpp__dep__incl.pdf differ diff --git a/latex/barraydensecell-bones_8hpp__dep__incl.pdf b/latex/barraydensecell-bones_8hpp__dep__incl.pdf index 60063519a..c96a5651b 100644 Binary files a/latex/barraydensecell-bones_8hpp__dep__incl.pdf and b/latex/barraydensecell-bones_8hpp__dep__incl.pdf differ diff --git a/latex/barraydensecell-meat_8hpp__dep__incl.pdf b/latex/barraydensecell-meat_8hpp__dep__incl.pdf index 9a54bb49e..fdf578bd9 100644 Binary files a/latex/barraydensecell-meat_8hpp__dep__incl.pdf and b/latex/barraydensecell-meat_8hpp__dep__incl.pdf differ diff --git a/latex/barraydensecol-bones_8hpp__dep__incl.pdf b/latex/barraydensecol-bones_8hpp__dep__incl.pdf index 8411cd7a1..751a8caa8 100644 Binary files a/latex/barraydensecol-bones_8hpp__dep__incl.pdf and b/latex/barraydensecol-bones_8hpp__dep__incl.pdf differ diff --git a/latex/barraydenserow-bones_8hpp__dep__incl.pdf b/latex/barraydenserow-bones_8hpp__dep__incl.pdf index 62c823a3a..854b53101 100644 Binary files a/latex/barraydenserow-bones_8hpp__dep__incl.pdf and b/latex/barraydenserow-bones_8hpp__dep__incl.pdf differ diff --git a/latex/barry-configuration_8hpp__dep__incl.pdf b/latex/barry-configuration_8hpp__dep__incl.pdf index e6ffb1d43..a705100a9 100644 Binary files a/latex/barry-configuration_8hpp__dep__incl.pdf and b/latex/barry-configuration_8hpp__dep__incl.pdf differ diff --git a/latex/barry-debug_8hpp__dep__incl.pdf b/latex/barry-debug_8hpp__dep__incl.pdf index ffd59b724..ec9188e85 100644 Binary files a/latex/barry-debug_8hpp__dep__incl.pdf and b/latex/barry-debug_8hpp__dep__incl.pdf differ diff --git a/latex/barry-macros_8hpp__dep__incl.pdf b/latex/barry-macros_8hpp__dep__incl.pdf index 208255e0d..8aecba7c8 100644 Binary files a/latex/barry-macros_8hpp__dep__incl.pdf and b/latex/barry-macros_8hpp__dep__incl.pdf differ diff --git a/latex/barry_8hpp__incl.pdf b/latex/barry_8hpp__incl.pdf index a50e40b78..39557df0b 100644 Binary files a/latex/barry_8hpp__incl.pdf and b/latex/barry_8hpp__incl.pdf differ diff --git a/latex/cell-bones_8hpp__dep__incl.pdf b/latex/cell-bones_8hpp__dep__incl.pdf index b1df68254..42f0589f7 100644 Binary files a/latex/cell-bones_8hpp__dep__incl.pdf and b/latex/cell-bones_8hpp__dep__incl.pdf differ diff --git a/latex/cell-meat_8hpp__dep__incl.pdf b/latex/cell-meat_8hpp__dep__incl.pdf index 3b72baa0c..b602e0235 100644 Binary files a/latex/cell-meat_8hpp__dep__incl.pdf and b/latex/cell-meat_8hpp__dep__incl.pdf differ diff --git a/latex/class_b_array_dense.tex b/latex/class_b_array_dense.tex index b202b8b53..0d192adfc 100644 --- a/latex/class_b_array_dense.tex +++ b/latex/class_b_array_dense.tex @@ -342,7 +342,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 905 of file barraydense-\/meat.\+hpp. +Definition at line 909 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a5b241b60d7c99fd4619cd4e2403ee884}\label{class_b_array_dense_a5b241b60d7c99fd4619cd4e2403ee884}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!col@{col}} @@ -353,7 +353,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 498 of file barraydense-\/meat.\+hpp. +Definition at line 502 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_aab73e0b18411b13221ca2fc9ad1b32fd}\label{class_b_array_dense_aab73e0b18411b13221ca2fc9ad1b32fd}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!col@{col}} @@ -364,7 +364,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 484 of file barraydense-\/meat.\+hpp. +Definition at line 488 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_ae2207066de4ec5e28e341321aae26960}\label{class_b_array_dense_ae2207066de4ec5e28e341321aae26960}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!colsum@{colsum}} @@ -375,7 +375,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 1008 of file barraydense-\/meat.\+hpp. +Definition at line 1012 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a8f1094e98af820ffb02934d8a691751d}\label{class_b_array_dense_a8f1094e98af820ffb02934d8a691751d}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!D@{D}} @@ -430,7 +430,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 571 of file barraydense-\/meat.\+hpp. +Definition at line 575 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_afe9f21012d8f54b242a48e57a7a34e10}\label{class_b_array_dense_afe9f21012d8f54b242a48e57a7a34e10}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!get\_cell@{get\_cell}} @@ -474,7 +474,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 998 of file barraydense-\/meat.\+hpp. +Definition at line 1002 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a945764807abfac5045a02bb3878a09dc}\label{class_b_array_dense_a945764807abfac5045a02bb3878a09dc}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!get\_entries@{get\_entries}} @@ -494,7 +494,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ \end{DoxyReturn} -Definition at line 510 of file barraydense-\/meat.\+hpp. +Definition at line 514 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a91d6658c5563f03962f65bfa32b8e60f}\label{class_b_array_dense_a91d6658c5563f03962f65bfa32b8e60f}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!get\_row\_vec@{get\_row\_vec}} @@ -527,7 +527,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 697 of file barraydense-\/meat.\+hpp. +Definition at line 701 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a5650c73724d28e5073a1f7afb3fb7f81}\label{class_b_array_dense_a5650c73724d28e5073a1f7afb3fb7f81}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!insert\_cell@{insert\_cell}} @@ -538,7 +538,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 663 of file barraydense-\/meat.\+hpp. +Definition at line 667 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_ac9eb73069ecd3ec66960d25e189dcfed}\label{class_b_array_dense_ac9eb73069ecd3ec66960d25e189dcfed}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!is\_dense@{is\_dense}} @@ -560,7 +560,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 539 of file barraydense-\/meat.\+hpp. +Definition at line 543 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a3d63c3c7c3f63a7f7b3c76bf5f8d9667}\label{class_b_array_dense_a3d63c3c7c3f63a7f7b3c76bf5f8d9667}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!ncol@{ncol}} @@ -571,7 +571,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 556 of file barraydense-\/meat.\+hpp. +Definition at line 560 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a52a8a365c14b4fa90ea6c7657afcc889}\label{class_b_array_dense_a52a8a365c14b4fa90ea6c7657afcc889}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!nnozero@{nnozero}} @@ -582,7 +582,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 560 of file barraydense-\/meat.\+hpp. +Definition at line 564 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a525c028e44f7619b3edb540c85c0eaf5}\label{class_b_array_dense_a525c028e44f7619b3edb540c85c0eaf5}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!nrow@{nrow}} @@ -593,7 +593,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 552 of file barraydense-\/meat.\+hpp. +Definition at line 556 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_aceaa98609154a7610f5ef22150f0204d}\label{class_b_array_dense_aceaa98609154a7610f5ef22150f0204d}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!operator()@{operator()}} @@ -604,7 +604,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 615 of file barraydense-\/meat.\+hpp. +Definition at line 619 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a85ab2af2ed687b83b16cb3764c9578bf}\label{class_b_array_dense_a85ab2af2ed687b83b16cb3764c9578bf}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!operator()@{operator()}} @@ -615,7 +615,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 626 of file barraydense-\/meat.\+hpp. +Definition at line 630 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a84c1fe2f7c54597e6bd37c52cb3e09c3}\label{class_b_array_dense_a84c1fe2f7c54597e6bd37c52cb3e09c3}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!operator$\ast$=@{operator$\ast$=}} @@ -647,7 +647,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 576 of file barraydense-\/meat.\+hpp. +Definition at line 580 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a923f4bdf529b0b8a7598cea88c084215}\label{class_b_array_dense_a923f4bdf529b0b8a7598cea88c084215}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!operator-\/=@{operator-\/=}} @@ -672,7 +672,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 595 of file barraydense-\/meat.\+hpp. +Definition at line 599 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a89728a6f8b38b02ae5abb0ab58c74013}\label{class_b_array_dense_a89728a6f8b38b02ae5abb0ab58c74013}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!operator/=@{operator/=}} @@ -742,7 +742,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 964 of file barraydense-\/meat.\+hpp. +Definition at line 968 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_ae37e80c20cee4ce892a210135d2695ab}\label{class_b_array_dense_ae37e80c20cee4ce892a210135d2695ab}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!reserve@{reserve}} @@ -753,7 +753,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 955 of file barraydense-\/meat.\+hpp. +Definition at line 959 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_af808d73fa9ad5aad452268038030f4f3}\label{class_b_array_dense_af808d73fa9ad5aad452268038030f4f3}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!resize@{resize}} @@ -764,7 +764,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 919 of file barraydense-\/meat.\+hpp. +Definition at line 923 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a6d6c2456bc2e4fb20bbcd4d4a8f16700}\label{class_b_array_dense_a6d6c2456bc2e4fb20bbcd4d4a8f16700}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!rm\_cell@{rm\_cell}} @@ -775,7 +775,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 640 of file barraydense-\/meat.\+hpp. +Definition at line 644 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_ad42ce9542e5a9fc7d6c2f219d64aca66}\label{class_b_array_dense_ad42ce9542e5a9fc7d6c2f219d64aca66}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!row@{row}} @@ -786,7 +786,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 470 of file barraydense-\/meat.\+hpp. +Definition at line 474 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a91855b374277bd4d2888333e49718bc2}\label{class_b_array_dense_a91855b374277bd4d2888333e49718bc2}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!row@{row}} @@ -797,7 +797,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 457 of file barraydense-\/meat.\+hpp. +Definition at line 461 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a3985df34bf01505f7d217209d40de214}\label{class_b_array_dense_a3985df34bf01505f7d217209d40de214}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!rowsum@{rowsum}} @@ -808,7 +808,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 1003 of file barraydense-\/meat.\+hpp. +Definition at line 1007 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a773a7953f931a84847c2e63aa0f7d53f}\label{class_b_array_dense_a773a7953f931a84847c2e63aa0f7d53f}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!set\_data@{set\_data}} @@ -841,7 +841,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 728 of file barraydense-\/meat.\+hpp. +Definition at line 732 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a203223d1bb73e5b1b5b536b2e39256a6}\label{class_b_array_dense_a203223d1bb73e5b1b5b536b2e39256a6}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!swap\_cols@{swap\_cols}} @@ -852,7 +852,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 812 of file barraydense-\/meat.\+hpp. +Definition at line 816 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_aabd5445944fd4beececa8e464423f396}\label{class_b_array_dense_aabd5445944fd4beececa8e464423f396}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!swap\_rows@{swap\_rows}} @@ -863,7 +863,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 784 of file barraydense-\/meat.\+hpp. +Definition at line 788 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a9a4c476e28e4491793c38ad2f14715a8}\label{class_b_array_dense_a9a4c476e28e4491793c38ad2f14715a8}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!toggle\_cell@{toggle\_cell}} @@ -874,7 +874,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 765 of file barraydense-\/meat.\+hpp. +Definition at line 769 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_adffea380472c935d845af78f81751e35}\label{class_b_array_dense_adffea380472c935d845af78f81751e35}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!toggle\_lock@{toggle\_lock}} @@ -892,7 +892,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 877 of file barraydense-\/meat.\+hpp. +Definition at line 881 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a9d5d4dfaafbf89e58346c07247646b2a}\label{class_b_array_dense_a9d5d4dfaafbf89e58346c07247646b2a}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!zero\_col@{zero\_col}} @@ -903,7 +903,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 858 of file barraydense-\/meat.\+hpp. +Definition at line 862 of file barraydense-\/meat.\+hpp. \mbox{\Hypertarget{class_b_array_dense_a0ce76bf9727c4ae16de50551461a5df5}\label{class_b_array_dense_a0ce76bf9727c4ae16de50551461a5df5}} \index{BArrayDense$<$ Cell\_Type, Data\_Type $>$@{BArrayDense$<$ Cell\_Type, Data\_Type $>$}!zero\_row@{zero\_row}} @@ -914,7 +914,7 @@ \subsubsection*{template$<$typename Cell\+\_\+\+Type = bool, typename Data\+\_\+ -Definition at line 839 of file barraydense-\/meat.\+hpp. +Definition at line 843 of file barraydense-\/meat.\+hpp. diff --git a/latex/class_const_b_array_row_iter__coll__graph.pdf b/latex/class_const_b_array_row_iter__coll__graph.pdf index 4ce6cb984..c757b3d3a 100644 Binary files a/latex/class_const_b_array_row_iter__coll__graph.pdf and b/latex/class_const_b_array_row_iter__coll__graph.pdf differ diff --git a/latex/class_d_e_f_m__coll__graph.pdf b/latex/class_d_e_f_m__coll__graph.pdf index bcae05195..c9741caa1 100644 Binary files a/latex/class_d_e_f_m__coll__graph.pdf and b/latex/class_d_e_f_m__coll__graph.pdf differ diff --git a/latex/class_d_e_f_m__inherit__graph.pdf b/latex/class_d_e_f_m__inherit__graph.pdf index bcae05195..c9741caa1 100644 Binary files a/latex/class_d_e_f_m__inherit__graph.pdf and b/latex/class_d_e_f_m__inherit__graph.pdf differ diff --git a/latex/class_d_e_f_m_rule_data__inherit__graph.pdf b/latex/class_d_e_f_m_rule_data__inherit__graph.pdf index f9ff03ea4..2152290a1 100644 Binary files a/latex/class_d_e_f_m_rule_data__inherit__graph.pdf and b/latex/class_d_e_f_m_rule_data__inherit__graph.pdf differ diff --git a/latex/class_d_e_f_m_rule_dyn_data__coll__graph.pdf b/latex/class_d_e_f_m_rule_dyn_data__coll__graph.pdf index ce7af0520..d1450ec80 100644 Binary files a/latex/class_d_e_f_m_rule_dyn_data__coll__graph.pdf and b/latex/class_d_e_f_m_rule_dyn_data__coll__graph.pdf differ diff --git a/latex/class_d_e_f_m_rule_dyn_data__inherit__graph.pdf b/latex/class_d_e_f_m_rule_dyn_data__inherit__graph.pdf index ce7af0520..d1450ec80 100644 Binary files a/latex/class_d_e_f_m_rule_dyn_data__inherit__graph.pdf and b/latex/class_d_e_f_m_rule_dyn_data__inherit__graph.pdf differ diff --git a/latex/class_flock.tex b/latex/class_flock.tex index ad2568f42..be23c1b0a 100644 --- a/latex/class_flock.tex +++ b/latex/class_flock.tex @@ -142,7 +142,7 @@ -Definition at line 228 of file flock-\/meat.\+hpp. +Definition at line 250 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a1010aa9fb40acb618c604c531e2528bb}\label{class_flock_a1010aa9fb40acb618c604c531e2528bb}} \index{Flock@{Flock}!get\_counters@{get\_counters}} @@ -238,7 +238,7 @@ -Definition at line 171 of file flock-\/meat.\+hpp. +Definition at line 193 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a68af1602108455f9d339bc4c2994e9ab}\label{class_flock_a68af1602108455f9d339bc4c2994e9ab}} \index{Flock@{Flock}!nleafs@{nleafs}} @@ -248,7 +248,7 @@ -Definition at line 199 of file flock-\/meat.\+hpp. +Definition at line 221 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_ae1f4eb8ade1c7f369e1f1eddbced3b2b}\label{class_flock_ae1f4eb8ade1c7f369e1f1eddbced3b2b}} \index{Flock@{Flock}!nnodes@{nnodes}} @@ -258,7 +258,7 @@ -Definition at line 185 of file flock-\/meat.\+hpp. +Definition at line 207 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a71d5966ea3fda9e2baedf76be6c837c6}\label{class_flock_a71d5966ea3fda9e2baedf76be6c837c6}} \index{Flock@{Flock}!nterms@{nterms}} @@ -268,7 +268,7 @@ -Definition at line 213 of file flock-\/meat.\+hpp. +Definition at line 235 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_ae47e9d235c3e3e6f3bb574772f2463d0}\label{class_flock_ae47e9d235c3e3e6f3bb574772f2463d0}} \index{Flock@{Flock}!ntrees@{ntrees}} @@ -278,7 +278,7 @@ -Definition at line 178 of file flock-\/meat.\+hpp. +Definition at line 200 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a00fde307995418d36deeedbc78f29a7a}\label{class_flock_a00fde307995418d36deeedbc78f29a7a}} \index{Flock@{Flock}!operator()@{operator()}} @@ -302,7 +302,7 @@ \end{DoxyReturn} -Definition at line 306 of file flock-\/meat.\+hpp. +Definition at line 328 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a58f2282d4cd764e9912c94b613aa58d2}\label{class_flock_a58f2282d4cd764e9912c94b613aa58d2}} \index{Flock@{Flock}!parse\_polytomies@{parse\_polytomies}} @@ -316,7 +316,7 @@ -Definition at line 235 of file flock-\/meat.\+hpp. +Definition at line 257 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a5ddb72e66fc90f45335e8752e290dc3e}\label{class_flock_a5ddb72e66fc90f45335e8752e290dc3e}} \index{Flock@{Flock}!print@{print}} @@ -326,7 +326,7 @@ -Definition at line 262 of file flock-\/meat.\+hpp. +Definition at line 284 of file flock-\/meat.\+hpp. \mbox{\Hypertarget{class_flock_a15ba537520410f84e924b0eab0a893f4}\label{class_flock_a15ba537520410f84e924b0eab0a893f4}} \index{Flock@{Flock}!set\_seed@{set\_seed}} @@ -355,7 +355,7 @@ -Definition at line 221 of file flock-\/meat.\+hpp. +Definition at line 243 of file flock-\/meat.\+hpp. diff --git a/latex/class_model.tex b/latex/class_model.tex index cbd189fd0..3a8d5a403 100644 --- a/latex/class_model.tex +++ b/latex/class_model.tex @@ -300,7 +300,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 186 of file model-\/meat.\+hpp. +Definition at line 171 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a5026c5d72a07db2eff58689fe101a57d}\label{class_model_a5026c5d72a07db2eff58689fe101a57d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!Model@{Model}} @@ -311,7 +311,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 220 of file model-\/meat.\+hpp. +Definition at line 205 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a43b71b392309bd71ed7c49f783b8815b}\label{class_model_a43b71b392309bd71ed7c49f783b8815b}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!Model@{Model}} @@ -322,7 +322,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 258 of file model-\/meat.\+hpp. +Definition at line 243 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a58dc9105b487e0e2d2cb3faa16397ae2}\label{class_model_a58dc9105b487e0e2d2cb3faa16397ae2}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!````~Model@{$\sim$Model}} @@ -361,7 +361,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D \end{DoxyReturn} When computing with the powerset, we need to grow the corresponding vectors on the fly -Definition at line 491 of file model-\/meat.\+hpp. +Definition at line 476 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a2326ca9975e29d3cf1902b6e60c613b9}\label{class_model_a2326ca9975e29d3cf1902b6e60c613b9}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_counter@{add\_counter}} @@ -372,7 +372,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 367 of file model-\/meat.\+hpp. +Definition at line 352 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a60bc7a1e36ed90ff0af62a3999b9d06f}\label{class_model_a60bc7a1e36ed90ff0af62a3999b9d06f}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_counter@{add\_counter}} @@ -383,7 +383,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 376 of file model-\/meat.\+hpp. +Definition at line 361 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a5e0ab8493a4aeecacc96d666089c543d}\label{class_model_a5e0ab8493a4aeecacc96d666089c543d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_hasher@{add\_hasher}} @@ -394,7 +394,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 411 of file model-\/meat.\+hpp. +Definition at line 396 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_af9b85db739f6947861fe123136c11c07}\label{class_model_af9b85db739f6947861fe123136c11c07}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule@{add\_rule}} @@ -405,7 +405,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 422 of file model-\/meat.\+hpp. +Definition at line 407 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a8a27b1ce7513359b61840a15fc661575}\label{class_model_a8a27b1ce7513359b61840a15fc661575}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule@{add\_rule}} @@ -423,7 +423,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 450 of file model-\/meat.\+hpp. +Definition at line 435 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a6df0512038f2eae91f67ef151ae95328}\label{class_model_a6df0512038f2eae91f67ef151ae95328}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule\_dyn@{add\_rule\_dyn}} @@ -434,7 +434,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 459 of file model-\/meat.\+hpp. +Definition at line 444 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a61b7baf9d45f885832db74fb9cd99c4d}\label{class_model_a61b7baf9d45f885832db74fb9cd99c4d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!colnames@{colnames}} @@ -445,7 +445,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1146 of file model-\/meat.\+hpp. +Definition at line 1133 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a3f13aa5080ce580a11892cf6a69fee64}\label{class_model_a3f13aa5080ce580a11892cf6a69fee64}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!conditional\_prob@{conditional\_prob}} @@ -476,7 +476,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D \end{DoxyReturn} -Definition at line 1411 of file model-\/meat.\+hpp. +Definition at line 1399 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a5ab59e34639b590094bc2716d056e78c}\label{class_model_a5ab59e34639b590094bc2716d056e78c}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!gen\_key@{gen\_key}} @@ -487,7 +487,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 360 of file model-\/meat.\+hpp. +Definition at line 345 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_ab705e7531998b61c1358c6cbef773e0d}\label{class_model_ab705e7531998b61c1358c6cbef773e0d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_arrays2support@{get\_arrays2support}} @@ -498,7 +498,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1482 of file model-\/meat.\+hpp. +Definition at line 1472 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a2345f3e51002d81bd60cb0b14f006dbd}\label{class_model_a2345f3e51002d81bd60cb0b14f006dbd}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_counters@{get\_counters}} @@ -509,7 +509,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1449 of file model-\/meat.\+hpp. +Definition at line 1437 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_acaeee0e986e406918d1b07e329d4e28d}\label{class_model_acaeee0e986e406918d1b07e329d4e28d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_normalizing\_constants@{get\_normalizing\_constants}} @@ -520,7 +520,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 966 of file model-\/meat.\+hpp. +Definition at line 951 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_aefb5399f2e396d34eb523e00c7d89140}\label{class_model_aefb5399f2e396d34eb523e00c7d89140}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_pset@{get\_pset}} @@ -531,7 +531,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 973 of file model-\/meat.\+hpp. +Definition at line 959 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a567fbbecd8a77f62ada9535f1e56588f}\label{class_model_a567fbbecd8a77f62ada9535f1e56588f}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_pset\_arrays@{get\_pset\_arrays}} @@ -542,7 +542,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1488 of file model-\/meat.\+hpp. +Definition at line 1479 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a248d9516ebc938e2ab5df4f4f9d78121}\label{class_model_a248d9516ebc938e2ab5df4f4f9d78121}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_pset\_probs@{get\_pset\_probs}} @@ -553,7 +553,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1498 of file model-\/meat.\+hpp. +Definition at line 1491 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a453d05dbfcef337c385afc7f2000d56b}\label{class_model_a453d05dbfcef337c385afc7f2000d56b}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_pset\_stats@{get\_pset\_stats}} @@ -568,7 +568,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1493 of file model-\/meat.\+hpp. +Definition at line 1485 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_ab19a8398b4f3fb8a21f8ed89aec2fbf7}\label{class_model_ab19a8398b4f3fb8a21f8ed89aec2fbf7}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_pset\_stats@{get\_pset\_stats}} @@ -579,7 +579,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 986 of file model-\/meat.\+hpp. +Definition at line 973 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a02cac4f649946705bfb4d69bc3a3576f}\label{class_model_a02cac4f649946705bfb4d69bc3a3576f}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_rengine@{get\_rengine}} @@ -590,7 +590,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1444 of file model-\/meat.\+hpp. +Definition at line 1432 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a8796a5e54c0ba505129db2bc1e452d0d}\label{class_model_a8796a5e54c0ba505129db2bc1e452d0d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_rules@{get\_rules}} @@ -601,7 +601,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1454 of file model-\/meat.\+hpp. +Definition at line 1442 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_aff4c85b28ba08c67b6d3308cf94fc30a}\label{class_model_aff4c85b28ba08c67b6d3308cf94fc30a}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_rules\_dyn@{get\_rules\_dyn}} @@ -612,7 +612,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1459 of file model-\/meat.\+hpp. +Definition at line 1447 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a35e9c4103deb9e2deda35c2c61b30289}\label{class_model_a35e9c4103deb9e2deda35c2c61b30289}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_stats\_support@{get\_stats\_support}} @@ -623,7 +623,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1476 of file model-\/meat.\+hpp. +Definition at line 1465 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a5414f4d58c598c844bf0e7885e06488a}\label{class_model_a5414f4d58c598c844bf0e7885e06488a}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_stats\_target@{get\_stats\_target}} @@ -638,7 +638,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D The support of the model is stored as a vector of vector$<$double$>$. Each element of it contains the support for an specific type of array included. It represents an array of size {\ttfamily (k + 1) x n unique elements}, with the data stored by-\/row. The last element of each entry corresponds to the weights, i.\+e., the frequency with which such sufficient statistics are observed in the support. -Definition at line 1470 of file model-\/meat.\+hpp. +Definition at line 1458 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a5a887a9d87a1f86ccc783fd27a0a1ddc}\label{class_model_a5a887a9d87a1f86ccc783fd27a0a1ddc}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_support\_fun@{get\_support\_fun}} @@ -649,7 +649,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1465 of file model-\/meat.\+hpp. +Definition at line 1453 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a2b216befc5a05c5aa6607b9b617b14f6}\label{class_model_a2b216befc5a05c5aa6607b9b617b14f6}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!likelihood@{likelihood}} @@ -660,7 +660,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 672 of file model-\/meat.\+hpp. +Definition at line 657 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a085429b8f8d8d81a7f742fdc3deceeee}\label{class_model_a085429b8f8d8d81a7f742fdc3deceeee}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!likelihood@{likelihood}} @@ -671,7 +671,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 818 of file model-\/meat.\+hpp. +Definition at line 803 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a6640d5add2e5e2004202b81866339a3a}\label{class_model_a6640d5add2e5e2004202b81866339a3a}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!likelihood@{likelihood}} @@ -682,7 +682,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 627 of file model-\/meat.\+hpp. +Definition at line 612 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a6ed252b0bcc46668bee04f543bbafdae}\label{class_model_a6ed252b0bcc46668bee04f543bbafdae}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!likelihood@{likelihood}} @@ -693,7 +693,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 754 of file model-\/meat.\+hpp. +Definition at line 739 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a7ecc7893f532a3fc4cb4149eb587dc3e}\label{class_model_a7ecc7893f532a3fc4cb4149eb587dc3e}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!likelihood\_total@{likelihood\_total}} @@ -704,7 +704,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 888 of file model-\/meat.\+hpp. +Definition at line 873 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a6a1213e74dd4d7ce7b0071a664b6f3b3}\label{class_model_a6a1213e74dd4d7ce7b0071a664b6f3b3}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!nrules@{nrules}} @@ -715,7 +715,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1117 of file model-\/meat.\+hpp. +Definition at line 1104 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a9a9ea5238be86c147f9ec264eb51b984}\label{class_model_a9a9ea5238be86c147f9ec264eb51b984}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!nrules\_dyn@{nrules\_dyn}} @@ -726,7 +726,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1125 of file model-\/meat.\+hpp. +Definition at line 1112 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a79ebbea31dc3742c37eba173c25acd5d}\label{class_model_a79ebbea31dc3742c37eba173c25acd5d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!nterms@{nterms}} @@ -737,7 +737,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1106 of file model-\/meat.\+hpp. +Definition at line 1093 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a4cf7b0d8d1c1d5996e09b3dbf7599cd6}\label{class_model_a4cf7b0d8d1c1d5996e09b3dbf7599cd6}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!operator=@{operator=}} @@ -748,7 +748,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 302 of file model-\/meat.\+hpp. +Definition at line 287 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a9b882a97407460beb9b97405fac98dd9}\label{class_model_a9b882a97407460beb9b97405fac98dd9}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!print@{print}} @@ -763,7 +763,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1028 of file model-\/meat.\+hpp. +Definition at line 1015 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a72f41dd130d67b171acc433fa288de78}\label{class_model_a72f41dd130d67b171acc433fa288de78}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!print\_stats@{print\_stats}} @@ -774,7 +774,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 998 of file model-\/meat.\+hpp. +Definition at line 985 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a2adac6eb2d37bd67d5f0222374ce193d}\label{class_model_a2adac6eb2d37bd67d5f0222374ce193d}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!sample@{sample}} @@ -785,7 +785,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D When computing with the powerset, we need to grow the corresponding vectors on the fly -Definition at line 1242 of file model-\/meat.\+hpp. +Definition at line 1230 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_ad6d0a2c68540fe6480337a606c14cea6}\label{class_model_ad6d0a2c68540fe6480337a606c14cea6}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!sample@{sample}} @@ -796,7 +796,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1162 of file model-\/meat.\+hpp. +Definition at line 1150 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a93632a05117d5b862d082885015c9363}\label{class_model_a93632a05117d5b862d082885015c9363}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!set\_counters@{set\_counters}} @@ -807,7 +807,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 393 of file model-\/meat.\+hpp. +Definition at line 378 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_af86cd3bfb4b3c929a263090950435a3c}\label{class_model_af86cd3bfb4b3c929a263090950435a3c}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!set\_rengine@{set\_rengine}} @@ -829,7 +829,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 432 of file model-\/meat.\+hpp. +Definition at line 417 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_ab200cf9d28983471fa8264fc90071bad}\label{class_model_ab200cf9d28983471fa8264fc90071bad}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!set\_rules\_dyn@{set\_rules\_dyn}} @@ -840,7 +840,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 474 of file model-\/meat.\+hpp. +Definition at line 459 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_afe7f86754248416469456f98f493c9b5}\label{class_model_afe7f86754248416469456f98f493c9b5}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!set\_seed@{set\_seed}} @@ -879,7 +879,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D \end{DoxyParams} -Definition at line 1503 of file model-\/meat.\+hpp. +Definition at line 1497 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a1d45ad43d7aa468deb326074e110524b}\label{class_model_a1d45ad43d7aa468deb326074e110524b}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!size@{size}} @@ -890,7 +890,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1089 of file model-\/meat.\+hpp. +Definition at line 1076 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a0261a55996a1707b9bae97544f1fabf8}\label{class_model_a0261a55996a1707b9bae97544f1fabf8}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!size\_unique@{size\_unique}} @@ -901,7 +901,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1097 of file model-\/meat.\+hpp. +Definition at line 1084 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a3e8c4587b259d60fcf7c70c7e3f55082}\label{class_model_a3e8c4587b259d60fcf7c70c7e3f55082}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!store\_psets@{store\_psets}} @@ -912,7 +912,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 352 of file model-\/meat.\+hpp. +Definition at line 337 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a98e5f6188b1d3235efa61b72f4562741}\label{class_model_a98e5f6188b1d3235efa61b72f4562741}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!support\_size@{support\_size}} @@ -923,7 +923,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D -Definition at line 1133 of file model-\/meat.\+hpp. +Definition at line 1120 of file model-\/meat.\+hpp. \mbox{\Hypertarget{class_model_a9f17772e230a4790ee6b7d028eca7e26}\label{class_model_a9f17772e230a4790ee6b7d028eca7e26}} \index{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Model$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!transform\_model@{transform\_model}} @@ -945,7 +945,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$$>$, typename D This function will compute the normalizing constant for a given set of parameters. It will also update the {\ttfamily normalizing\+\_\+constants} member variable. -Definition at line 149 of file model-\/meat.\+hpp. +Definition at line 134 of file model-\/meat.\+hpp. diff --git a/latex/class_model__coll__graph.pdf b/latex/class_model__coll__graph.pdf index c6ee4755b..a52e637d8 100644 Binary files a/latex/class_model__coll__graph.pdf and b/latex/class_model__coll__graph.pdf differ diff --git a/latex/class_node__coll__graph.pdf b/latex/class_node__coll__graph.pdf index 5a1ea689d..fbd2d9719 100644 Binary files a/latex/class_node__coll__graph.pdf and b/latex/class_node__coll__graph.pdf differ diff --git a/latex/class_power_set__coll__graph.pdf b/latex/class_power_set__coll__graph.pdf index eb196d09c..6381fed02 100644 Binary files a/latex/class_power_set__coll__graph.pdf and b/latex/class_power_set__coll__graph.pdf differ diff --git a/latex/class_support.tex b/latex/class_support.tex index 8adc1ca1c..6a1e680e7 100644 --- a/latex/class_support.tex +++ b/latex/class_support.tex @@ -209,7 +209,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 416 of file support-\/meat.\+hpp. +Definition at line 417 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a60a380edc9eeae8c7f88d06440116c48}\label{class_support_a60a380edc9eeae8c7f88d06440116c48}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule@{add\_rule}} @@ -220,7 +220,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 443 of file support-\/meat.\+hpp. +Definition at line 444 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a98650a3fd5c652922e00edc9163074e1}\label{class_support_a98650a3fd5c652922e00edc9163074e1}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule@{add\_rule}} @@ -231,7 +231,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 453 of file support-\/meat.\+hpp. +Definition at line 454 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a71e963ffbb78d36ea75f96afc6a477e3}\label{class_support_a71e963ffbb78d36ea75f96afc6a477e3}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule\_dyn@{add\_rule\_dyn}} @@ -242,7 +242,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 478 of file support-\/meat.\+hpp. +Definition at line 479 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a1e29c5a5a603a704cf08ca7094dff9d7}\label{class_support_a1e29c5a5a603a704cf08ca7094dff9d7}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!add\_rule\_dyn@{add\_rule\_dyn}} @@ -253,7 +253,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 488 of file support-\/meat.\+hpp. +Definition at line 489 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a1f72e55e9f2ffbd5bb07ccecfa6ad876}\label{class_support_a1f72e55e9f2ffbd5bb07ccecfa6ad876}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!calc@{calc}} @@ -277,7 +277,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, \end{DoxyParams} -Definition at line 382 of file support-\/meat.\+hpp. +Definition at line 383 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a0f3a2ffc8015a7967b5fc892cd2e3888}\label{class_support_a0f3a2ffc8015a7967b5fc892cd2e3888}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!eval\_rules\_dyn@{eval\_rules\_dyn}} @@ -288,7 +288,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 513 of file support-\/meat.\+hpp. +Definition at line 514 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a9f2237792f9688bf86ae89454048db9a}\label{class_support_a9f2237792f9688bf86ae89454048db9a}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_counters@{get\_counters}} @@ -303,7 +303,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 593 of file support-\/meat.\+hpp. +Definition at line 594 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a47cc8dfe2705652a988cf77f0f27b43e}\label{class_support_a47cc8dfe2705652a988cf77f0f27b43e}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_counts@{get\_counts}} @@ -314,7 +314,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 557 of file support-\/meat.\+hpp. +Definition at line 558 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_afc4fca55ca37dc97ed692687c38c7ce2}\label{class_support_afc4fca55ca37dc97ed692687c38c7ce2}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_current\_stats@{get\_current\_stats}} @@ -329,7 +329,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 571 of file support-\/meat.\+hpp. +Definition at line 572 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_ac19420a6296244d85274261f39e4ceae}\label{class_support_ac19420a6296244d85274261f39e4ceae}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_data@{get\_data}} @@ -340,7 +340,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 588 of file support-\/meat.\+hpp. +Definition at line 589 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a368a9c7797e1a76c3ee150070e66c212}\label{class_support_a368a9c7797e1a76c3ee150070e66c212}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_rules@{get\_rules}} @@ -355,7 +355,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 598 of file support-\/meat.\+hpp. +Definition at line 599 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a53daafcd49daac43c6e8841a8a17a05a}\label{class_support_a53daafcd49daac43c6e8841a8a17a05a}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!get\_rules\_dyn@{get\_rules\_dyn}} @@ -370,7 +370,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 603 of file support-\/meat.\+hpp. +Definition at line 604 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a50d9804b965b3b3a9f9fd6d0e60a3204}\label{class_support_a50d9804b965b3b3a9f9fd6d0e60a3204}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!init\_support@{init\_support}} @@ -392,7 +392,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 576 of file support-\/meat.\+hpp. +Definition at line 577 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_ac583eaddbf96b6825beb4aeb45bc3a99}\label{class_support_ac583eaddbf96b6825beb4aeb45bc3a99}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!reset\_array@{reset\_array}} @@ -425,7 +425,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 426 of file support-\/meat.\+hpp. +Definition at line 427 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_af537df5404dcd989b9d606e4dae454e1}\label{class_support_af537df5404dcd989b9d606e4dae454e1}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!set\_rules@{set\_rules}} @@ -436,7 +436,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 463 of file support-\/meat.\+hpp. +Definition at line 464 of file support-\/meat.\+hpp. \mbox{\Hypertarget{class_support_a9e296aa740b9aad3e7feef3981002c9e}\label{class_support_a9e296aa740b9aad3e7feef3981002c9e}} \index{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$@{Support$<$ Array\_Type, Data\_Counter\_Type, Data\_Rule\_Type, Data\_Rule\_Dyn\_Type $>$}!set\_rules\_dyn@{set\_rules\_dyn}} @@ -447,7 +447,7 @@ \subsubsection*{template$<$typename Array\+\_\+\+Type = BArray$<$bool, bool$>$, -Definition at line 498 of file support-\/meat.\+hpp. +Definition at line 499 of file support-\/meat.\+hpp. diff --git a/latex/counters-bones_8hpp__dep__incl.pdf b/latex/counters-bones_8hpp__dep__incl.pdf index 9f32249d4..a34f4408b 100644 Binary files a/latex/counters-bones_8hpp__dep__incl.pdf and b/latex/counters-bones_8hpp__dep__incl.pdf differ diff --git a/latex/counters-meat_8hpp__dep__incl.pdf b/latex/counters-meat_8hpp__dep__incl.pdf index b9435b450..a166e11d0 100644 Binary files a/latex/counters-meat_8hpp__dep__incl.pdf and b/latex/counters-meat_8hpp__dep__incl.pdf differ diff --git a/latex/defm-bones_8hpp__dep__incl.pdf b/latex/defm-bones_8hpp__dep__incl.pdf index cd056b53c..2bfaa4edb 100644 Binary files a/latex/defm-bones_8hpp__dep__incl.pdf and b/latex/defm-bones_8hpp__dep__incl.pdf differ diff --git a/latex/defm-meat_8hpp__dep__incl.pdf b/latex/defm-meat_8hpp__dep__incl.pdf index a952faba6..d69c4c778 100644 Binary files a/latex/defm-meat_8hpp__dep__incl.pdf and b/latex/defm-meat_8hpp__dep__incl.pdf differ diff --git a/latex/defm-types_8hpp__dep__incl.pdf b/latex/defm-types_8hpp__dep__incl.pdf index 0991dafec..033028cd1 100644 Binary files a/latex/defm-types_8hpp__dep__incl.pdf and b/latex/defm-types_8hpp__dep__incl.pdf differ diff --git a/latex/defm_2counters_8hpp__dep__incl.pdf b/latex/defm_2counters_8hpp__dep__incl.pdf index 9f570ed92..5d34e9344 100644 Binary files a/latex/defm_2counters_8hpp__dep__incl.pdf and b/latex/defm_2counters_8hpp__dep__incl.pdf differ diff --git a/latex/defm_2counters_8hpp__incl.pdf b/latex/defm_2counters_8hpp__incl.pdf index 95107924b..aa5b5af05 100644 Binary files a/latex/defm_2counters_8hpp__incl.pdf and b/latex/defm_2counters_8hpp__incl.pdf differ diff --git a/latex/defm_8hpp__incl.pdf b/latex/defm_8hpp__incl.pdf index f2840a517..d24478f68 100644 Binary files a/latex/defm_8hpp__incl.pdf and b/latex/defm_8hpp__incl.pdf differ diff --git a/latex/dir_488ec4010567cc6d95c62bdcb57a6d3e_dep.pdf b/latex/dir_488ec4010567cc6d95c62bdcb57a6d3e_dep.pdf index d419cb124..3157235c6 100644 Binary files a/latex/dir_488ec4010567cc6d95c62bdcb57a6d3e_dep.pdf and b/latex/dir_488ec4010567cc6d95c62bdcb57a6d3e_dep.pdf differ diff --git a/latex/dir_6e63e3665115632dc5d61b2d6d6c3354_dep.pdf b/latex/dir_6e63e3665115632dc5d61b2d6d6c3354_dep.pdf index 2c10bee3d..20b71d21d 100644 Binary files a/latex/dir_6e63e3665115632dc5d61b2d6d6c3354_dep.pdf and b/latex/dir_6e63e3665115632dc5d61b2d6d6c3354_dep.pdf differ diff --git a/latex/dir_d44c64559bbebec7f509842c48db8b23_dep.pdf b/latex/dir_d44c64559bbebec7f509842c48db8b23_dep.pdf index a3fc4f4dc..677e7b360 100644 Binary files a/latex/dir_d44c64559bbebec7f509842c48db8b23_dep.pdf and b/latex/dir_d44c64559bbebec7f509842c48db8b23_dep.pdf differ diff --git a/latex/flock-bones_8hpp__dep__incl.pdf b/latex/flock-bones_8hpp__dep__incl.pdf index 52f591262..6a0b72b3e 100644 Binary files a/latex/flock-bones_8hpp__dep__incl.pdf and b/latex/flock-bones_8hpp__dep__incl.pdf differ diff --git a/latex/flock-meat_8hpp__dep__incl.pdf b/latex/flock-meat_8hpp__dep__incl.pdf index b65627ca2..d4c10965a 100644 Binary files a/latex/flock-meat_8hpp__dep__incl.pdf and b/latex/flock-meat_8hpp__dep__incl.pdf differ diff --git a/latex/formula_8hpp__dep__incl.pdf b/latex/formula_8hpp__dep__incl.pdf index e2ca0e5e1..27f6ffdf9 100644 Binary files a/latex/formula_8hpp__dep__incl.pdf and b/latex/formula_8hpp__dep__incl.pdf differ diff --git a/latex/freqtable_8hpp__dep__incl.pdf b/latex/freqtable_8hpp__dep__incl.pdf index a262186e7..c3325fe02 100644 Binary files a/latex/freqtable_8hpp__dep__incl.pdf and b/latex/freqtable_8hpp__dep__incl.pdf differ diff --git a/latex/geese-bones_8hpp__dep__incl.pdf b/latex/geese-bones_8hpp__dep__incl.pdf index 5494e2a35..ffbc6c4b5 100644 Binary files a/latex/geese-bones_8hpp__dep__incl.pdf and b/latex/geese-bones_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-constructors_8hpp__dep__incl.pdf b/latex/geese-meat-constructors_8hpp__dep__incl.pdf index 2a796242f..107a8d6ea 100644 Binary files a/latex/geese-meat-constructors_8hpp__dep__incl.pdf and b/latex/geese-meat-constructors_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-likelihood_8hpp__dep__incl.pdf b/latex/geese-meat-likelihood_8hpp__dep__incl.pdf index c5be91cec..7d599c319 100644 Binary files a/latex/geese-meat-likelihood_8hpp__dep__incl.pdf and b/latex/geese-meat-likelihood_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-likelihood_8hpp__incl.pdf b/latex/geese-meat-likelihood_8hpp__incl.pdf index d8ef4eea3..dd5a6d585 100644 Binary files a/latex/geese-meat-likelihood_8hpp__incl.pdf and b/latex/geese-meat-likelihood_8hpp__incl.pdf differ diff --git a/latex/geese-meat-likelihood__exhaust_8hpp__dep__incl.pdf b/latex/geese-meat-likelihood__exhaust_8hpp__dep__incl.pdf index 34e86fda0..d8c2b43af 100644 Binary files a/latex/geese-meat-likelihood__exhaust_8hpp__dep__incl.pdf and b/latex/geese-meat-likelihood__exhaust_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-predict_8hpp__dep__incl.pdf b/latex/geese-meat-predict_8hpp__dep__incl.pdf index 19644b338..76236db6f 100644 Binary files a/latex/geese-meat-predict_8hpp__dep__incl.pdf and b/latex/geese-meat-predict_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-predict__exhaust_8hpp__dep__incl.pdf b/latex/geese-meat-predict__exhaust_8hpp__dep__incl.pdf index 3563e4ad3..e81d873fb 100644 Binary files a/latex/geese-meat-predict__exhaust_8hpp__dep__incl.pdf and b/latex/geese-meat-predict__exhaust_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-predict__sim_8hpp__dep__incl.pdf b/latex/geese-meat-predict__sim_8hpp__dep__incl.pdf index 4f105e38d..52f8620f0 100644 Binary files a/latex/geese-meat-predict__sim_8hpp__dep__incl.pdf and b/latex/geese-meat-predict__sim_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat-simulate_8hpp__dep__incl.pdf b/latex/geese-meat-simulate_8hpp__dep__incl.pdf index d5a355ef5..0125e1ced 100644 Binary files a/latex/geese-meat-simulate_8hpp__dep__incl.pdf and b/latex/geese-meat-simulate_8hpp__dep__incl.pdf differ diff --git a/latex/geese-meat_8hpp__dep__incl.pdf b/latex/geese-meat_8hpp__dep__incl.pdf index e920a121d..5d83bd934 100644 Binary files a/latex/geese-meat_8hpp__dep__incl.pdf and b/latex/geese-meat_8hpp__dep__incl.pdf differ diff --git a/latex/geese-node-bones_8hpp__dep__incl.pdf b/latex/geese-node-bones_8hpp__dep__incl.pdf index e9bd387e5..e8f615527 100644 Binary files a/latex/geese-node-bones_8hpp__dep__incl.pdf and b/latex/geese-node-bones_8hpp__dep__incl.pdf differ diff --git a/latex/geese-types_8hpp__dep__incl.pdf b/latex/geese-types_8hpp__dep__incl.pdf index 7732f1407..e5580fb4b 100644 Binary files a/latex/geese-types_8hpp__dep__incl.pdf and b/latex/geese-types_8hpp__dep__incl.pdf differ diff --git a/latex/geese_2counters_8hpp__dep__incl.pdf b/latex/geese_2counters_8hpp__dep__incl.pdf index 9f9d10ae0..580be4cb4 100644 Binary files a/latex/geese_2counters_8hpp__dep__incl.pdf and b/latex/geese_2counters_8hpp__dep__incl.pdf differ diff --git a/latex/geese_8hpp__incl.pdf b/latex/geese_8hpp__incl.pdf index ed07f8f98..8aa0b822a 100644 Binary files a/latex/geese_8hpp__incl.pdf and b/latex/geese_8hpp__incl.pdf differ diff --git a/latex/group__counters-phylo.pdf b/latex/group__counters-phylo.pdf index 344d8dcb5..7f70400b2 100644 Binary files a/latex/group__counters-phylo.pdf and b/latex/group__counters-phylo.pdf differ diff --git a/latex/group__rules-phylo.pdf b/latex/group__rules-phylo.pdf index fd0ec3fe8..6b91d5546 100644 Binary files a/latex/group__rules-phylo.pdf and b/latex/group__rules-phylo.pdf differ diff --git a/latex/model-bones_8hpp__dep__incl.pdf b/latex/model-bones_8hpp__dep__incl.pdf index 40ac614ff..76c6a7199 100644 Binary files a/latex/model-bones_8hpp__dep__incl.pdf and b/latex/model-bones_8hpp__dep__incl.pdf differ diff --git a/latex/model-meat_8hpp.tex b/latex/model-meat_8hpp.tex index fb0ff3fb0..90db998cc 100644 --- a/latex/model-meat_8hpp.tex +++ b/latex/model-meat_8hpp.tex @@ -26,7 +26,7 @@ -Definition at line 90 of file model-\/meat.\+hpp. +Definition at line 71 of file model-\/meat.\+hpp. \mbox{\Hypertarget{model-meat_8hpp_aaa38b3c2cb53d9f51f0dffde9eaff719}\label{model-meat_8hpp_aaa38b3c2cb53d9f51f0dffde9eaff719}} \index{model-\/meat.hpp@{model-\/meat.hpp}!update\_normalizing\_constant@{update\_normalizing\_constant}} diff --git a/latex/model-meat_8hpp__dep__incl.pdf b/latex/model-meat_8hpp__dep__incl.pdf index cb215c7c4..830bc0e5d 100644 Binary files a/latex/model-meat_8hpp__dep__incl.pdf and b/latex/model-meat_8hpp__dep__incl.pdf differ diff --git a/latex/network-css_8hpp__dep__incl.pdf b/latex/network-css_8hpp__dep__incl.pdf index 401421220..ea1b7ddd6 100644 Binary files a/latex/network-css_8hpp__dep__incl.pdf and b/latex/network-css_8hpp__dep__incl.pdf differ diff --git a/latex/network_8hpp__dep__incl.pdf b/latex/network_8hpp__dep__incl.pdf index 9bd6f9786..7472e9671 100644 Binary files a/latex/network_8hpp__dep__incl.pdf and b/latex/network_8hpp__dep__incl.pdf differ diff --git a/latex/network_8hpp__incl.pdf b/latex/network_8hpp__incl.pdf index 7771f887f..4f0bd4b9c 100644 Binary files a/latex/network_8hpp__incl.pdf and b/latex/network_8hpp__incl.pdf differ diff --git a/latex/powerset-bones_8hpp__dep__incl.pdf b/latex/powerset-bones_8hpp__dep__incl.pdf index 0cdb39f1b..6bdbac23f 100644 Binary files a/latex/powerset-bones_8hpp__dep__incl.pdf and b/latex/powerset-bones_8hpp__dep__incl.pdf differ diff --git a/latex/powerset-meat_8hpp__dep__incl.pdf b/latex/powerset-meat_8hpp__dep__incl.pdf index 975c5ce83..e91b6d2ac 100644 Binary files a/latex/powerset-meat_8hpp__dep__incl.pdf and b/latex/powerset-meat_8hpp__dep__incl.pdf differ diff --git a/latex/progress_8hpp__dep__incl.pdf b/latex/progress_8hpp__dep__incl.pdf index 6d813c6ba..ac71dc01a 100644 Binary files a/latex/progress_8hpp__dep__incl.pdf and b/latex/progress_8hpp__dep__incl.pdf differ diff --git a/latex/refman.log b/latex/refman.log index 1e061667b..283550056 100644 --- a/latex/refman.log +++ b/latex/refman.log @@ -1,4 +1,4 @@ -This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Alpine Linux) (preloaded format=pdflatex 2023.10.3) 3 OCT 2023 05:21 +This is pdfTeX, Version 3.14159265-2.6-1.40.21 (TeX Live 2020/Alpine Linux) (preloaded format=pdflatex 2023.10.4) 4 OCT 2023 04:34 entering extended mode restricted \write18 enabled. %&-line parsing enabled. @@ -5980,7 +5980,7 @@ are/texmf-dist/fonts/type1/urw/courier/ucrro8a.pfb> -Output written on refman.pdf (404 pages, 1531747 bytes). +Output written on refman.pdf (404 pages, 1531750 bytes). PDF statistics: 17830 PDF objects out of 18468 (max. 8388607) 16929 compressed objects within 170 object streams diff --git a/latex/refman.pdf b/latex/refman.pdf index cd8c1ba8c..2ed26da42 100644 Binary files a/latex/refman.pdf and b/latex/refman.pdf differ diff --git a/latex/rules-bones_8hpp__dep__incl.pdf b/latex/rules-bones_8hpp__dep__incl.pdf index dcb9827c9..9f83b8af3 100644 Binary files a/latex/rules-bones_8hpp__dep__incl.pdf and b/latex/rules-bones_8hpp__dep__incl.pdf differ diff --git a/latex/rules-meat_8hpp__dep__incl.pdf b/latex/rules-meat_8hpp__dep__incl.pdf index 32be55d2b..e4eca7e2a 100644 Binary files a/latex/rules-meat_8hpp__dep__incl.pdf and b/latex/rules-meat_8hpp__dep__incl.pdf differ diff --git a/latex/statscounter-bones_8hpp__dep__incl.pdf b/latex/statscounter-bones_8hpp__dep__incl.pdf index 68cf02797..1a0d46ad0 100644 Binary files a/latex/statscounter-bones_8hpp__dep__incl.pdf and b/latex/statscounter-bones_8hpp__dep__incl.pdf differ diff --git a/latex/statscounter-meat_8hpp__dep__incl.pdf b/latex/statscounter-meat_8hpp__dep__incl.pdf index bb61bcc3d..4812945fb 100644 Binary files a/latex/statscounter-meat_8hpp__dep__incl.pdf and b/latex/statscounter-meat_8hpp__dep__incl.pdf differ diff --git a/latex/support-bones_8hpp__dep__incl.pdf b/latex/support-bones_8hpp__dep__incl.pdf index f7378dbd3..3b72afc9c 100644 Binary files a/latex/support-bones_8hpp__dep__incl.pdf and b/latex/support-bones_8hpp__dep__incl.pdf differ diff --git a/latex/support-meat_8hpp__dep__incl.pdf b/latex/support-meat_8hpp__dep__incl.pdf index 5f655da21..3029c48cf 100644 Binary files a/latex/support-meat_8hpp__dep__incl.pdf and b/latex/support-meat_8hpp__dep__incl.pdf differ diff --git a/latex/typedefs_8hpp__dep__incl.pdf b/latex/typedefs_8hpp__dep__incl.pdf index 8584d1deb..11aed28fc 100644 Binary files a/latex/typedefs_8hpp__dep__incl.pdf and b/latex/typedefs_8hpp__dep__incl.pdf differ diff --git a/latex/typedefs_8hpp__incl.pdf b/latex/typedefs_8hpp__incl.pdf index 789e5a67d..a25a66fc7 100644 Binary files a/latex/typedefs_8hpp__incl.pdf and b/latex/typedefs_8hpp__incl.pdf differ diff --git a/model-bones_8hpp.html b/model-bones_8hpp.html index e1295e013..76b75b4d4 100644 --- a/model-bones_8hpp.html +++ b/model-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/model-bones_8hpp_source.html b/model-bones_8hpp_source.html index 017352ecc..ada218c08 100644 --- a/model-bones_8hpp_source.html +++ b/model-bones_8hpp_source.html @@ -326,74 +326,74 @@
                                                                                                                                            A counter function based on change statistics.
                                                                                                                                            Vector of counters.
                                                                                                                                            General framework for discrete exponential models. This class allows generating discrete exponential ...
                                                                                                                                            Definition: model-bones.hpp:34
                                                                                                                                            -
                                                                                                                                            size_t size_unique() const noexcept
                                                                                                                                            +
                                                                                                                                            size_t size_unique() const noexcept
                                                                                                                                            std::vector< std::string > transform_model_term_names
                                                                                                                                            -
                                                                                                                                            const std::mt19937 * get_rengine() const
                                                                                                                                            +
                                                                                                                                            const std::mt19937 * get_rengine() const
                                                                                                                                            bool delete_rules
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * rules_dyn
                                                                                                                                            Definition: model-bones.hpp:93
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * rules
                                                                                                                                            Definition: model-bones.hpp:92
                                                                                                                                            StatsCounter< Array_Type, Data_Counter_Type > counter_fun
                                                                                                                                            Definition: model-bones.hpp:95
                                                                                                                                            -
                                                                                                                                            size_t size() const noexcept
                                                                                                                                            -
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > &counter)
                                                                                                                                            Definition: model-meat.hpp:367
                                                                                                                                            -
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            +
                                                                                                                                            size_t size() const noexcept
                                                                                                                                            +
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > &counter)
                                                                                                                                            Definition: model-meat.hpp:352
                                                                                                                                            +
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            std::vector< std::vector< double > > stats_target
                                                                                                                                            Target statistics of the model.
                                                                                                                                            Definition: model-bones.hpp:64
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_pset_probs()
                                                                                                                                            -
                                                                                                                                            Array_Type sample(const Array_Type &Array_, const std::vector< double > &params={})
                                                                                                                                            -
                                                                                                                                            void update_normalizing_constants(const std::vector< double > &params,)
                                                                                                                                            Computes the normalizing constant for a given set of parameters.
                                                                                                                                            Definition: model-meat.hpp:149
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_stats_support()
                                                                                                                                            -
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:450
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_pset_probs()
                                                                                                                                            +
                                                                                                                                            Array_Type sample(const Array_Type &Array_, const std::vector< double > &params={})
                                                                                                                                            +
                                                                                                                                            void update_normalizing_constants(const std::vector< double > &params,)
                                                                                                                                            Computes the normalizing constant for a given set of parameters.
                                                                                                                                            Definition: model-meat.hpp:134
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_stats_support()
                                                                                                                                            +
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:435
                                                                                                                                            std::vector< std::vector< double > > stats_support
                                                                                                                                            Sufficient statistics of the model (support)
                                                                                                                                            Definition: model-bones.hpp:62
                                                                                                                                            -
                                                                                                                                            void store_psets() noexcept
                                                                                                                                            Definition: model-meat.hpp:352
                                                                                                                                            -
                                                                                                                                            double conditional_prob(const Array_Type &Array_, const std::vector< double > &params, size_t i, size_t j)
                                                                                                                                            Conditional probability ("Gibbs sampler")
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_pset_stats()
                                                                                                                                            Statistics of the support(s)
                                                                                                                                            -
                                                                                                                                            Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > & operator=(const Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > &Model_)
                                                                                                                                            Definition: model-meat.hpp:302
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_stats_target()
                                                                                                                                            Raw pointers to the support and target statistics.
                                                                                                                                            +
                                                                                                                                            void store_psets() noexcept
                                                                                                                                            Definition: model-meat.hpp:337
                                                                                                                                            +
                                                                                                                                            double conditional_prob(const Array_Type &Array_, const std::vector< double > &params, size_t i, size_t j)
                                                                                                                                            Conditional probability ("Gibbs sampler")
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_pset_stats()
                                                                                                                                            Statistics of the support(s)
                                                                                                                                            +
                                                                                                                                            Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > & operator=(const Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > &Model_)
                                                                                                                                            Definition: model-meat.hpp:287
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_stats_target()
                                                                                                                                            Raw pointers to the support and target statistics.
                                                                                                                                            bool delete_rengine
                                                                                                                                            Definition: model-bones.hpp:43
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< Array_Type > > * get_pset_arrays()
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< Array_Type > > * get_pset_arrays()
                                                                                                                                            virtual ~Model()
                                                                                                                                            -
                                                                                                                                            Support< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > * get_support_fun()
                                                                                                                                            -
                                                                                                                                            std::vector< double > gen_key(const Array_Type &Array_)
                                                                                                                                            Definition: model-meat.hpp:360
                                                                                                                                            +
                                                                                                                                            Support< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > * get_support_fun()
                                                                                                                                            +
                                                                                                                                            std::vector< double > gen_key(const Array_Type &Array_)
                                                                                                                                            Definition: model-meat.hpp:345
                                                                                                                                            std::vector< size_t > arrays2support
                                                                                                                                            Definition: model-bones.hpp:65
                                                                                                                                            -
                                                                                                                                            size_t add_array(const Array_Type &Array_, bool force_new=false)
                                                                                                                                            Adds an array to the support of not already included.
                                                                                                                                            Definition: model-meat.hpp:491
                                                                                                                                            -
                                                                                                                                            void add_hasher(Hasher_fun_type< Array_Type, Data_Counter_Type > fun_)
                                                                                                                                            Definition: model-meat.hpp:411
                                                                                                                                            -
                                                                                                                                            std::vector< std::string > colnames() const
                                                                                                                                            -
                                                                                                                                            double likelihood(const std::vector< double > &params, const size_t &i, bool as_log=false, bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:627
                                                                                                                                            -
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:432
                                                                                                                                            +
                                                                                                                                            size_t add_array(const Array_Type &Array_, bool force_new=false)
                                                                                                                                            Adds an array to the support of not already included.
                                                                                                                                            Definition: model-meat.hpp:476
                                                                                                                                            +
                                                                                                                                            void add_hasher(Hasher_fun_type< Array_Type, Data_Counter_Type > fun_)
                                                                                                                                            Definition: model-meat.hpp:396
                                                                                                                                            +
                                                                                                                                            std::vector< std::string > colnames() const
                                                                                                                                            +
                                                                                                                                            double likelihood(const std::vector< double > &params, const size_t &i, bool as_log=false, bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:612
                                                                                                                                            +
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:417
                                                                                                                                            std::vector< std::vector< double > > pset_stats
                                                                                                                                            Statistics of the support(s)
                                                                                                                                            Definition: model-bones.hpp:82
                                                                                                                                            -
                                                                                                                                            size_t nrules() const noexcept
                                                                                                                                            +
                                                                                                                                            size_t nrules() const noexcept
                                                                                                                                            std::vector< size_t > stats_support_n_arrays
                                                                                                                                            Number of arrays included per support.
                                                                                                                                            Definition: model-bones.hpp:63
                                                                                                                                            -
                                                                                                                                            void print_stats(size_t i) const
                                                                                                                                            Definition: model-meat.hpp:998
                                                                                                                                            -
                                                                                                                                            size_t nterms() const noexcept
                                                                                                                                            -
                                                                                                                                            double likelihood_total(const std::vector< double > &params, bool as_log=false, BARRY_NCORES_ARG(=2), bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:888
                                                                                                                                            +
                                                                                                                                            void print_stats(size_t i) const
                                                                                                                                            Definition: model-meat.hpp:985
                                                                                                                                            +
                                                                                                                                            size_t nterms() const noexcept
                                                                                                                                            +
                                                                                                                                            double likelihood_total(const std::vector< double > &params, bool as_log=false, BARRY_NCORES_ARG(=2), bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:873
                                                                                                                                            bool with_pset
                                                                                                                                            Definition: model-bones.hpp:80
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            bool delete_rules_dyn
                                                                                                                                            bool delete_counters
                                                                                                                                            -
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            Definition: model-meat.hpp:393
                                                                                                                                            -
                                                                                                                                            size_t support_size() const noexcept
                                                                                                                                            -
                                                                                                                                            size_t nrules_dyn() const noexcept
                                                                                                                                            +
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            Definition: model-meat.hpp:378
                                                                                                                                            +
                                                                                                                                            size_t support_size() const noexcept
                                                                                                                                            +
                                                                                                                                            size_t nrules_dyn() const noexcept
                                                                                                                                            std::vector< std::vector< double > > params_last
                                                                                                                                            Vector of the previously used parameters.
                                                                                                                                            Definition: model-bones.hpp:99
                                                                                                                                            -
                                                                                                                                            virtual void print() const
                                                                                                                                            Prints information about the model.
                                                                                                                                            +
                                                                                                                                            virtual void print() const
                                                                                                                                            Prints information about the model.
                                                                                                                                            std::vector< double > transform_model(double *data, size_t k)
                                                                                                                                            std::mt19937 * rengine
                                                                                                                                            Definition: model-bones.hpp:42
                                                                                                                                            Support< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > support_fun
                                                                                                                                            Definition: model-bones.hpp:94
                                                                                                                                            -
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:474
                                                                                                                                            +
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:459
                                                                                                                                            std::vector< std::vector< Array_Type > > pset_arrays
                                                                                                                                            Arrays of the support(s)
                                                                                                                                            Definition: model-bones.hpp:81
                                                                                                                                            std::function< std::vector< double >double *, size_t k)> transform_model_fun
                                                                                                                                            Transformation of the model.
                                                                                                                                            -
                                                                                                                                            std::vector< size_t > * get_arrays2support()
                                                                                                                                            +
                                                                                                                                            std::vector< size_t > * get_arrays2support()
                                                                                                                                            MapVec_type< double, size_t > keys2support
                                                                                                                                            Map of types of arrays to support sets.
                                                                                                                                            Definition: model-bones.hpp:72
                                                                                                                                            -
                                                                                                                                            std::vector< double > & get_normalizing_constants()
                                                                                                                                            Definition: model-meat.hpp:966
                                                                                                                                            - +
                                                                                                                                            std::vector< double > & get_normalizing_constants()
                                                                                                                                            Definition: model-meat.hpp:951
                                                                                                                                            +
                                                                                                                                            std::vector< double > normalizing_constants
                                                                                                                                            std::vector< bool > first_calc_done
                                                                                                                                            -
                                                                                                                                            void set_transform_model(std::function< std::vector< double >(double *, size_t)> fun, std::vector< std::string > names)
                                                                                                                                            Set the transform_model_fun object.
                                                                                                                                            +
                                                                                                                                            void set_transform_model(std::function< std::vector< double >(double *, size_t)> fun, std::vector< std::string > names)
                                                                                                                                            Set the transform_model_fun object.
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * counters
                                                                                                                                            Definition: model-bones.hpp:91
                                                                                                                                            -
                                                                                                                                            const std::vector< Array_Type > * get_pset(const size_t &i)
                                                                                                                                            Definition: model-meat.hpp:973
                                                                                                                                            +
                                                                                                                                            const std::vector< Array_Type > * get_pset(const size_t &i)
                                                                                                                                            Definition: model-meat.hpp:959
                                                                                                                                            std::vector< std::vector< double > > pset_probs
                                                                                                                                            Probabilities of the support(s)
                                                                                                                                            Definition: model-bones.hpp:83
                                                                                                                                            void set_rengine(std::mt19937 *rengine_, bool delete_=false)
                                                                                                                                            -
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:422
                                                                                                                                            +
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:407
                                                                                                                                            void set_seed(size_t s)
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            Rule for determining if a cell should be included in a sequence.
                                                                                                                                            Definition: rules-bones.hpp:20
                                                                                                                                            Vector of objects of class Rule.
                                                                                                                                            Definition: rules-bones.hpp:71
                                                                                                                                            Count stats for a single Array.
                                                                                                                                            @@ -419,7 +419,7 @@ diff --git a/model-meat_8hpp.html b/model-meat_8hpp.html index 00ad582b6..84221e695 100644 --- a/model-meat_8hpp.html +++ b/model-meat_8hpp.html @@ -170,7 +170,7 @@

                                                                                                                                            -

                                                                                                                                            Definition at line 90 of file model-meat.hpp.

                                                                                                                                            +

                                                                                                                                            Definition at line 71 of file model-meat.hpp.

                                                                                                                                            @@ -230,7 +230,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/model-meat_8hpp_source.html b/model-meat_8hpp_source.html index fd40a0cea..12721229d 100644 --- a/model-meat_8hpp_source.html +++ b/model-meat_8hpp_source.html @@ -107,1639 +107,1633 @@
                                                                                                                                            14 )
                                                                                                                                            15 {
                                                                                                                                            16  double res = 0.0;
                                                                                                                                            -
                                                                                                                                            17 
                                                                                                                                            -
                                                                                                                                            18  if (n > 1000u)
                                                                                                                                            -
                                                                                                                                            19  {
                                                                                                                                            -
                                                                                                                                            20 
                                                                                                                                            -
                                                                                                                                            21  std::vector< double > resv(n, 0.0);
                                                                                                                                            +
                                                                                                                                            17 
                                                                                                                                            +
                                                                                                                                            18  std::vector< double > resv(n, 0.0);
                                                                                                                                            +
                                                                                                                                            19 
                                                                                                                                            +
                                                                                                                                            20  for (size_t j = 0u; j < (k - 1u); ++j)
                                                                                                                                            +
                                                                                                                                            21  {
                                                                                                                                            22 
                                                                                                                                            -
                                                                                                                                            23  for (size_t j = 0u; j < (k - 1u); ++j)
                                                                                                                                            -
                                                                                                                                            24  {
                                                                                                                                            -
                                                                                                                                            25 
                                                                                                                                            -
                                                                                                                                            26  const double p = params[j];
                                                                                                                                            -
                                                                                                                                            27 
                                                                                                                                            -
                                                                                                                                            28  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            -
                                                                                                                                            29  #pragma omp simd
                                                                                                                                            -
                                                                                                                                            30  #elif defined(__GNUC__) && !defined(__clang__)
                                                                                                                                            -
                                                                                                                                            31  #pragma GCC ivdep
                                                                                                                                            -
                                                                                                                                            32  #endif
                                                                                                                                            -
                                                                                                                                            33  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            -
                                                                                                                                            34  resv[i] += (*(support + i * k + 1u + j)) * p;
                                                                                                                                            -
                                                                                                                                            35 
                                                                                                                                            -
                                                                                                                                            36  }
                                                                                                                                            -
                                                                                                                                            37 
                                                                                                                                            -
                                                                                                                                            38  // Accumulate resv to a double res
                                                                                                                                            -
                                                                                                                                            39  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            -
                                                                                                                                            40  #pragma omp simd reduction(+:res)
                                                                                                                                            -
                                                                                                                                            41  #elif defined(__GNUC__) && !defined(__clang__)
                                                                                                                                            -
                                                                                                                                            42  #pragma GCC ivdep
                                                                                                                                            -
                                                                                                                                            43  #endif
                                                                                                                                            -
                                                                                                                                            44  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            -
                                                                                                                                            45  {
                                                                                                                                            -
                                                                                                                                            46  res += std::exp(resv[i] BARRY_SAFE_EXP) * (*(support + i * k));
                                                                                                                                            -
                                                                                                                                            47  }
                                                                                                                                            +
                                                                                                                                            23  const double p = params[j];
                                                                                                                                            +
                                                                                                                                            24 
                                                                                                                                            +
                                                                                                                                            25  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            26  #pragma omp simd
                                                                                                                                            +
                                                                                                                                            27  #elif defined(__GNUC__) && !defined(__clang__)
                                                                                                                                            +
                                                                                                                                            28  #pragma GCC ivdep
                                                                                                                                            +
                                                                                                                                            29  #endif
                                                                                                                                            +
                                                                                                                                            30  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            +
                                                                                                                                            31  resv[i] += (*(support + i * k + 1u + j)) * p;
                                                                                                                                            +
                                                                                                                                            32 
                                                                                                                                            +
                                                                                                                                            33  }
                                                                                                                                            +
                                                                                                                                            34 
                                                                                                                                            +
                                                                                                                                            35  // Accumulate resv to a double res
                                                                                                                                            +
                                                                                                                                            36  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            37  #pragma omp simd reduction(+:res)
                                                                                                                                            +
                                                                                                                                            38  #elif defined(__GNUC__) && !defined(__clang__)
                                                                                                                                            +
                                                                                                                                            39  #pragma GCC ivdep
                                                                                                                                            +
                                                                                                                                            40  #endif
                                                                                                                                            +
                                                                                                                                            41  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            +
                                                                                                                                            42  {
                                                                                                                                            +
                                                                                                                                            43  res += std::exp(resv[i] BARRY_SAFE_EXP) * (*(support + i * k));
                                                                                                                                            +
                                                                                                                                            44  }
                                                                                                                                            +
                                                                                                                                            45 
                                                                                                                                            +
                                                                                                                                            46 
                                                                                                                                            +
                                                                                                                                            47 
                                                                                                                                            48 
                                                                                                                                            -
                                                                                                                                            49  } else {
                                                                                                                                            -
                                                                                                                                            50 
                                                                                                                                            -
                                                                                                                                            51  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            -
                                                                                                                                            52  {
                                                                                                                                            -
                                                                                                                                            53 
                                                                                                                                            -
                                                                                                                                            54  double tmp = 0.0;
                                                                                                                                            -
                                                                                                                                            55  const double * support_n = support + i * k + 1u;
                                                                                                                                            -
                                                                                                                                            56 
                                                                                                                                            -
                                                                                                                                            57  for (size_t j = 0u; j < (k - 1u); ++j)
                                                                                                                                            -
                                                                                                                                            58  tmp += (*(support_n + j)) * params[j];
                                                                                                                                            -
                                                                                                                                            59 
                                                                                                                                            -
                                                                                                                                            60  res += std::exp(tmp BARRY_SAFE_EXP) * (*(support + i * k));
                                                                                                                                            -
                                                                                                                                            61 
                                                                                                                                            -
                                                                                                                                            62  }
                                                                                                                                            -
                                                                                                                                            63 
                                                                                                                                            +
                                                                                                                                            49  #ifdef BARRY_DEBUG
                                                                                                                                            +
                                                                                                                                            50  if (std::isnan(res))
                                                                                                                                            +
                                                                                                                                            51  throw std::overflow_error(
                                                                                                                                            +
                                                                                                                                            52  std::string("NaN in update_normalizing_constant. ") +
                                                                                                                                            +
                                                                                                                                            53  std::string("res = ") + std::to_string(res) +
                                                                                                                                            +
                                                                                                                                            54  std::string(", k = ") + std::to_string(k) +
                                                                                                                                            +
                                                                                                                                            55  std::string(", n = ") + std::to_string(n)
                                                                                                                                            +
                                                                                                                                            56  );
                                                                                                                                            +
                                                                                                                                            57  if (std::isinf(res))
                                                                                                                                            +
                                                                                                                                            58  throw std::overflow_error(
                                                                                                                                            +
                                                                                                                                            59  std::string("Inf in update_normalizing_constant. ") +
                                                                                                                                            +
                                                                                                                                            60  std::string("res = ") + std::to_string(res) +
                                                                                                                                            +
                                                                                                                                            61  std::string(", k = ") + std::to_string(k) +
                                                                                                                                            +
                                                                                                                                            62  std::string(", n = ") + std::to_string(n)
                                                                                                                                            +
                                                                                                                                            63  );
                                                                                                                                            64 
                                                                                                                                            -
                                                                                                                                            65  }
                                                                                                                                            +
                                                                                                                                            65  #endif
                                                                                                                                            66 
                                                                                                                                            -
                                                                                                                                            67 
                                                                                                                                            -
                                                                                                                                            68  #ifdef BARRY_DEBUG
                                                                                                                                            -
                                                                                                                                            69  if (std::isnan(res))
                                                                                                                                            -
                                                                                                                                            70  throw std::overflow_error(
                                                                                                                                            -
                                                                                                                                            71  std::string("NaN in update_normalizing_constant. ") +
                                                                                                                                            -
                                                                                                                                            72  std::string("res = ") + std::to_string(res) +
                                                                                                                                            -
                                                                                                                                            73  std::string(", k = ") + std::to_string(k) +
                                                                                                                                            -
                                                                                                                                            74  std::string(", n = ") + std::to_string(n)
                                                                                                                                            -
                                                                                                                                            75  );
                                                                                                                                            -
                                                                                                                                            76  if (std::isinf(res))
                                                                                                                                            -
                                                                                                                                            77  throw std::overflow_error(
                                                                                                                                            -
                                                                                                                                            78  std::string("Inf in update_normalizing_constant. ") +
                                                                                                                                            -
                                                                                                                                            79  std::string("res = ") + std::to_string(res) +
                                                                                                                                            -
                                                                                                                                            80  std::string(", k = ") + std::to_string(k) +
                                                                                                                                            -
                                                                                                                                            81  std::string(", n = ") + std::to_string(n)
                                                                                                                                            -
                                                                                                                                            82  );
                                                                                                                                            -
                                                                                                                                            83 
                                                                                                                                            -
                                                                                                                                            84  #endif
                                                                                                                                            -
                                                                                                                                            85 
                                                                                                                                            -
                                                                                                                                            86  return res;
                                                                                                                                            -
                                                                                                                                            87 
                                                                                                                                            -
                                                                                                                                            88 }
                                                                                                                                            -
                                                                                                                                            89 
                                                                                                                                            -
                                                                                                                                            90 inline double likelihood_(
                                                                                                                                            -
                                                                                                                                            91  const double * stats_target,
                                                                                                                                            -
                                                                                                                                            92  const std::vector< double > & params,
                                                                                                                                            -
                                                                                                                                            93  const double normalizing_constant,
                                                                                                                                            -
                                                                                                                                            94  size_t n_params,
                                                                                                                                            -
                                                                                                                                            95  bool log_ = false
                                                                                                                                            -
                                                                                                                                            96 ) {
                                                                                                                                            -
                                                                                                                                            97 
                                                                                                                                            -
                                                                                                                                            98  if (n_params != params.size())
                                                                                                                                            -
                                                                                                                                            99  throw std::length_error("-stats_target- and -params- should have the same length.");
                                                                                                                                            -
                                                                                                                                            100 
                                                                                                                                            -
                                                                                                                                            101  double numerator = 0.0;
                                                                                                                                            -
                                                                                                                                            102 
                                                                                                                                            -
                                                                                                                                            103  // Computing the numerator
                                                                                                                                            -
                                                                                                                                            104  for (size_t j = 0u; j < n_params; ++j)
                                                                                                                                            -
                                                                                                                                            105  numerator += *(stats_target + j) * params[j];
                                                                                                                                            -
                                                                                                                                            106 
                                                                                                                                            -
                                                                                                                                            107  if (!log_)
                                                                                                                                            -
                                                                                                                                            108  numerator = std::exp(numerator BARRY_SAFE_EXP);
                                                                                                                                            -
                                                                                                                                            109  else
                                                                                                                                            -
                                                                                                                                            110  return numerator BARRY_SAFE_EXP - std::log(normalizing_constant);
                                                                                                                                            -
                                                                                                                                            111 
                                                                                                                                            -
                                                                                                                                            112  double ans = numerator/normalizing_constant;
                                                                                                                                            -
                                                                                                                                            113 
                                                                                                                                            -
                                                                                                                                            114  #ifdef BARRY_DEBUG
                                                                                                                                            -
                                                                                                                                            115  if (std::isnan(ans))
                                                                                                                                            +
                                                                                                                                            67  return res;
                                                                                                                                            +
                                                                                                                                            68 
                                                                                                                                            +
                                                                                                                                            69 }
                                                                                                                                            +
                                                                                                                                            70 
                                                                                                                                            +
                                                                                                                                            71 inline double likelihood_(
                                                                                                                                            +
                                                                                                                                            72  const double * stats_target,
                                                                                                                                            +
                                                                                                                                            73  const std::vector< double > & params,
                                                                                                                                            +
                                                                                                                                            74  const double normalizing_constant,
                                                                                                                                            +
                                                                                                                                            75  size_t n_params,
                                                                                                                                            +
                                                                                                                                            76  bool log_ = false
                                                                                                                                            +
                                                                                                                                            77 ) {
                                                                                                                                            +
                                                                                                                                            78 
                                                                                                                                            +
                                                                                                                                            79  if (n_params != params.size())
                                                                                                                                            +
                                                                                                                                            80  throw std::length_error("-stats_target- and -params- should have the same length.");
                                                                                                                                            +
                                                                                                                                            81 
                                                                                                                                            +
                                                                                                                                            82  double numerator = 0.0;
                                                                                                                                            +
                                                                                                                                            83 
                                                                                                                                            +
                                                                                                                                            84  // Computing the numerator
                                                                                                                                            +
                                                                                                                                            85  #pragma code_align 32
                                                                                                                                            +
                                                                                                                                            86  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            87  #pragma omp simd reduction(+:numerator)
                                                                                                                                            +
                                                                                                                                            88  #endif
                                                                                                                                            +
                                                                                                                                            89  for (size_t j = 0u; j < n_params; ++j)
                                                                                                                                            +
                                                                                                                                            90  numerator += *(stats_target + j) * params[j];
                                                                                                                                            +
                                                                                                                                            91 
                                                                                                                                            +
                                                                                                                                            92  if (!log_)
                                                                                                                                            +
                                                                                                                                            93  numerator = std::exp(numerator BARRY_SAFE_EXP);
                                                                                                                                            +
                                                                                                                                            94  else
                                                                                                                                            +
                                                                                                                                            95  return numerator BARRY_SAFE_EXP - std::log(normalizing_constant);
                                                                                                                                            +
                                                                                                                                            96 
                                                                                                                                            +
                                                                                                                                            97  double ans = numerator/normalizing_constant;
                                                                                                                                            +
                                                                                                                                            98 
                                                                                                                                            +
                                                                                                                                            99  #ifdef BARRY_DEBUG
                                                                                                                                            +
                                                                                                                                            100  if (std::isnan(ans))
                                                                                                                                            +
                                                                                                                                            101  throw std::overflow_error(
                                                                                                                                            +
                                                                                                                                            102  std::string("NaN in likelihood_. ") +
                                                                                                                                            +
                                                                                                                                            103  std::string("numerator = ") + std::to_string(numerator) +
                                                                                                                                            +
                                                                                                                                            104  std::string(", normalizing_constant = ") +
                                                                                                                                            +
                                                                                                                                            105  std::to_string(normalizing_constant)
                                                                                                                                            +
                                                                                                                                            106  );
                                                                                                                                            +
                                                                                                                                            107  if (std::isinf(ans))
                                                                                                                                            +
                                                                                                                                            108  throw std::overflow_error(
                                                                                                                                            +
                                                                                                                                            109  std::string("Inf in likelihood_. ") +
                                                                                                                                            +
                                                                                                                                            110  std::string("numerator = ") + std::to_string(numerator) +
                                                                                                                                            +
                                                                                                                                            111  std::string(", normalizing_constant = ") +
                                                                                                                                            +
                                                                                                                                            112  std::to_string(normalizing_constant)
                                                                                                                                            +
                                                                                                                                            113  );
                                                                                                                                            +
                                                                                                                                            114 
                                                                                                                                            +
                                                                                                                                            115  if (ans > 1.0)
                                                                                                                                            116  throw std::overflow_error(
                                                                                                                                            -
                                                                                                                                            117  std::string("NaN in likelihood_. ") +
                                                                                                                                            +
                                                                                                                                            117  std::string("Likelihood > 1.0") +
                                                                                                                                            118  std::string("numerator = ") + std::to_string(numerator) +
                                                                                                                                            119  std::string(", normalizing_constant = ") +
                                                                                                                                            120  std::to_string(normalizing_constant)
                                                                                                                                            121  );
                                                                                                                                            -
                                                                                                                                            122  if (std::isinf(ans))
                                                                                                                                            -
                                                                                                                                            123  throw std::overflow_error(
                                                                                                                                            -
                                                                                                                                            124  std::string("Inf in likelihood_. ") +
                                                                                                                                            -
                                                                                                                                            125  std::string("numerator = ") + std::to_string(numerator) +
                                                                                                                                            -
                                                                                                                                            126  std::string(", normalizing_constant = ") +
                                                                                                                                            -
                                                                                                                                            127  std::to_string(normalizing_constant)
                                                                                                                                            -
                                                                                                                                            128  );
                                                                                                                                            -
                                                                                                                                            129 
                                                                                                                                            -
                                                                                                                                            130  if (ans > 1.0)
                                                                                                                                            -
                                                                                                                                            131  throw std::overflow_error(
                                                                                                                                            -
                                                                                                                                            132  std::string("Likelihood > 1.0") +
                                                                                                                                            -
                                                                                                                                            133  std::string("numerator = ") + std::to_string(numerator) +
                                                                                                                                            -
                                                                                                                                            134  std::string(", normalizing_constant = ") +
                                                                                                                                            -
                                                                                                                                            135  std::to_string(normalizing_constant)
                                                                                                                                            -
                                                                                                                                            136  );
                                                                                                                                            -
                                                                                                                                            137  #endif
                                                                                                                                            +
                                                                                                                                            122  #endif
                                                                                                                                            +
                                                                                                                                            123 
                                                                                                                                            +
                                                                                                                                            124  return ans;
                                                                                                                                            +
                                                                                                                                            125 
                                                                                                                                            +
                                                                                                                                            126 }
                                                                                                                                            +
                                                                                                                                            127 
                                                                                                                                            +
                                                                                                                                            128 template <
                                                                                                                                            +
                                                                                                                                            129  typename Array_Type,
                                                                                                                                            +
                                                                                                                                            130  typename Data_Counter_Type,
                                                                                                                                            +
                                                                                                                                            131  typename Data_Rule_Type,
                                                                                                                                            +
                                                                                                                                            132  typename Data_Rule_Dyn_Type
                                                                                                                                            +
                                                                                                                                            133  >
                                                                                                                                            + +
                                                                                                                                            135  const std::vector< double > & params,
                                                                                                                                            +
                                                                                                                                            136  size_t ncores
                                                                                                                                            +
                                                                                                                                            137 ) {
                                                                                                                                            138 
                                                                                                                                            -
                                                                                                                                            139  return ans;
                                                                                                                                            -
                                                                                                                                            140 
                                                                                                                                            -
                                                                                                                                            141 }
                                                                                                                                            -
                                                                                                                                            142 
                                                                                                                                            -
                                                                                                                                            143 template <
                                                                                                                                            -
                                                                                                                                            144  typename Array_Type,
                                                                                                                                            -
                                                                                                                                            145  typename Data_Counter_Type,
                                                                                                                                            -
                                                                                                                                            146  typename Data_Rule_Type,
                                                                                                                                            -
                                                                                                                                            147  typename Data_Rule_Dyn_Type
                                                                                                                                            -
                                                                                                                                            148  >
                                                                                                                                            - -
                                                                                                                                            150  const std::vector< double > & params,
                                                                                                                                            -
                                                                                                                                            151  size_t ncores
                                                                                                                                            -
                                                                                                                                            152 ) {
                                                                                                                                            +
                                                                                                                                            139  // Barrier to make sure paralelization makes sense
                                                                                                                                            +
                                                                                                                                            140  if ((ncores > 1u) && (stats_support.size() < 1000u))
                                                                                                                                            +
                                                                                                                                            141  ncores = 1u;
                                                                                                                                            +
                                                                                                                                            142 
                                                                                                                                            +
                                                                                                                                            143  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            144  #pragma omp parallel for firstprivate(params) num_threads(ncores) \
                                                                                                                                            +
                                                                                                                                            145  shared(stats_support, normalizing_constants, first_calc_done) \
                                                                                                                                            +
                                                                                                                                            146  default(none)
                                                                                                                                            +
                                                                                                                                            147  #endif
                                                                                                                                            +
                                                                                                                                            148  for (size_t i = 0u; i < stats_support.size(); ++i)
                                                                                                                                            +
                                                                                                                                            149  {
                                                                                                                                            +
                                                                                                                                            150 
                                                                                                                                            +
                                                                                                                                            151  size_t k = params.size() + 1u;
                                                                                                                                            +
                                                                                                                                            152  size_t n = stats_support[i].size() / k;
                                                                                                                                            153 
                                                                                                                                            -
                                                                                                                                            154  // Barrier to make sure paralelization makes sense
                                                                                                                                            -
                                                                                                                                            155  if ((ncores > 1u) && (stats_support.size() < 1000u))
                                                                                                                                            -
                                                                                                                                            156  ncores = 1u;
                                                                                                                                            -
                                                                                                                                            157 
                                                                                                                                            -
                                                                                                                                            158  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            -
                                                                                                                                            159  #pragma omp parallel for firstprivate(params) num_threads(ncores) \
                                                                                                                                            -
                                                                                                                                            160  shared(stats_support, normalizing_constants, first_calc_done) \
                                                                                                                                            -
                                                                                                                                            161  default(none)
                                                                                                                                            -
                                                                                                                                            162  #endif
                                                                                                                                            -
                                                                                                                                            163  for (size_t i = 0u; i < stats_support.size(); ++i)
                                                                                                                                            -
                                                                                                                                            164  {
                                                                                                                                            -
                                                                                                                                            165 
                                                                                                                                            -
                                                                                                                                            166  size_t k = params.size() + 1u;
                                                                                                                                            -
                                                                                                                                            167  size_t n = stats_support[i].size() / k;
                                                                                                                                            -
                                                                                                                                            168 
                                                                                                                                            -
                                                                                                                                            169  first_calc_done[i] = true;
                                                                                                                                            -
                                                                                                                                            170  normalizing_constants[i] = update_normalizing_constant(
                                                                                                                                            -
                                                                                                                                            171  params, &stats_support[i][0u], k, n
                                                                                                                                            -
                                                                                                                                            172  );
                                                                                                                                            -
                                                                                                                                            173 
                                                                                                                                            -
                                                                                                                                            174  }
                                                                                                                                            -
                                                                                                                                            175 
                                                                                                                                            -
                                                                                                                                            176  return;
                                                                                                                                            -
                                                                                                                                            177 
                                                                                                                                            -
                                                                                                                                            178 }
                                                                                                                                            -
                                                                                                                                            179 
                                                                                                                                            -
                                                                                                                                            180 template <
                                                                                                                                            -
                                                                                                                                            181  typename Array_Type,
                                                                                                                                            -
                                                                                                                                            182  typename Data_Counter_Type,
                                                                                                                                            -
                                                                                                                                            183  typename Data_Rule_Type,
                                                                                                                                            -
                                                                                                                                            184  typename Data_Rule_Dyn_Type
                                                                                                                                            -
                                                                                                                                            185  >
                                                                                                                                            - -
                                                                                                                                            187  stats_support(0u),
                                                                                                                                            -
                                                                                                                                            188  stats_support_n_arrays(0u),
                                                                                                                                            -
                                                                                                                                            189  stats_target(0u), arrays2support(0u),
                                                                                                                                            -
                                                                                                                                            190  keys2support(0u),
                                                                                                                                            -
                                                                                                                                            191  pset_arrays(0u), pset_stats(0u),
                                                                                                                                            -
                                                                                                                                            192  counters(new Counters<Array_Type,Data_Counter_Type>()),
                                                                                                                                            -
                                                                                                                                            193  rules(new Rules<Array_Type,Data_Rule_Type>()),
                                                                                                                                            -
                                                                                                                                            194  rules_dyn(new Rules<Array_Type,Data_Rule_Dyn_Type>()),
                                                                                                                                            -
                                                                                                                                            195  support_fun(), counter_fun(), delete_counters(true),
                                                                                                                                            -
                                                                                                                                            196  delete_rules(true),
                                                                                                                                            -
                                                                                                                                            197  delete_rules_dyn(true),
                                                                                                                                            -
                                                                                                                                            198  transform_model_fun(nullptr),
                                                                                                                                            -
                                                                                                                                            199  transform_model_term_names(0u)
                                                                                                                                            -
                                                                                                                                            200 {
                                                                                                                                            -
                                                                                                                                            201 
                                                                                                                                            -
                                                                                                                                            202  // Counters are shared
                                                                                                                                            -
                                                                                                                                            203  support_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            204  counter_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            205 
                                                                                                                                            -
                                                                                                                                            206  // Rules are shared
                                                                                                                                            -
                                                                                                                                            207  support_fun.set_rules(rules);
                                                                                                                                            -
                                                                                                                                            208  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            -
                                                                                                                                            209 
                                                                                                                                            -
                                                                                                                                            210  return;
                                                                                                                                            -
                                                                                                                                            211 
                                                                                                                                            -
                                                                                                                                            212 }
                                                                                                                                            -
                                                                                                                                            213 
                                                                                                                                            -
                                                                                                                                            214 template <
                                                                                                                                            -
                                                                                                                                            215  typename Array_Type,
                                                                                                                                            -
                                                                                                                                            216  typename Data_Counter_Type,
                                                                                                                                            -
                                                                                                                                            217  typename Data_Rule_Type,
                                                                                                                                            -
                                                                                                                                            218  typename Data_Rule_Dyn_Type
                                                                                                                                            -
                                                                                                                                            219  >
                                                                                                                                            - -
                                                                                                                                            221  size_t size_
                                                                                                                                            -
                                                                                                                                            222  ) :
                                                                                                                                            -
                                                                                                                                            223  stats_support(0u),
                                                                                                                                            -
                                                                                                                                            224  stats_support_n_arrays(0u),
                                                                                                                                            -
                                                                                                                                            225  stats_target(0u), arrays2support(0u), keys2support(0u),
                                                                                                                                            -
                                                                                                                                            226  pset_arrays(0u), pset_stats(0u),
                                                                                                                                            -
                                                                                                                                            227  counters(new Counters<Array_Type,Data_Counter_Type>()),
                                                                                                                                            -
                                                                                                                                            228  rules(new Rules<Array_Type,Data_Rule_Type>()),
                                                                                                                                            -
                                                                                                                                            229  rules_dyn(new Rules<Array_Type,Data_Rule_Dyn_Type>()),
                                                                                                                                            -
                                                                                                                                            230  support_fun(), counter_fun(), delete_counters(true),
                                                                                                                                            -
                                                                                                                                            231  delete_rules(true),
                                                                                                                                            -
                                                                                                                                            232  delete_rules_dyn(true),
                                                                                                                                            -
                                                                                                                                            233  transform_model_fun(nullptr),
                                                                                                                                            -
                                                                                                                                            234  transform_model_term_names(0u)
                                                                                                                                            -
                                                                                                                                            235 {
                                                                                                                                            -
                                                                                                                                            236 
                                                                                                                                            -
                                                                                                                                            237  stats_target.reserve(size_);
                                                                                                                                            -
                                                                                                                                            238  arrays2support.reserve(size_);
                                                                                                                                            -
                                                                                                                                            239 
                                                                                                                                            -
                                                                                                                                            240  // Counters are shared
                                                                                                                                            -
                                                                                                                                            241  support_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            242  counter_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            243 
                                                                                                                                            -
                                                                                                                                            244  // Rules are shared
                                                                                                                                            -
                                                                                                                                            245  support_fun.set_rules(rules);
                                                                                                                                            -
                                                                                                                                            246  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            -
                                                                                                                                            247 
                                                                                                                                            -
                                                                                                                                            248  return;
                                                                                                                                            -
                                                                                                                                            249 
                                                                                                                                            -
                                                                                                                                            250 }
                                                                                                                                            -
                                                                                                                                            251 
                                                                                                                                            -
                                                                                                                                            252 template <
                                                                                                                                            -
                                                                                                                                            253  typename Array_Type,
                                                                                                                                            -
                                                                                                                                            254  typename Data_Counter_Type,
                                                                                                                                            -
                                                                                                                                            255  typename Data_Rule_Type,
                                                                                                                                            -
                                                                                                                                            256  typename Data_Rule_Dyn_Type
                                                                                                                                            -
                                                                                                                                            257  >
                                                                                                                                            - - -
                                                                                                                                            260  ) :
                                                                                                                                            -
                                                                                                                                            261  stats_support(Model_.stats_support),
                                                                                                                                            -
                                                                                                                                            262  stats_support_n_arrays(Model_.stats_support_n_arrays),
                                                                                                                                            -
                                                                                                                                            263  stats_target(Model_.stats_target),
                                                                                                                                            -
                                                                                                                                            264  arrays2support(Model_.arrays2support),
                                                                                                                                            -
                                                                                                                                            265  keys2support(Model_.keys2support),
                                                                                                                                            -
                                                                                                                                            266  pset_arrays(Model_.pset_arrays),
                                                                                                                                            -
                                                                                                                                            267  pset_stats(Model_.pset_stats),
                                                                                                                                            -
                                                                                                                                            268  counters(new Counters<Array_Type,Data_Counter_Type>(*(Model_.counters))),
                                                                                                                                            -
                                                                                                                                            269  rules(new Rules<Array_Type,Data_Rule_Type>(*(Model_.rules))),
                                                                                                                                            -
                                                                                                                                            270  rules_dyn(new Rules<Array_Type,Data_Rule_Dyn_Type>(*(Model_.rules_dyn))),
                                                                                                                                            -
                                                                                                                                            271  support_fun(),
                                                                                                                                            -
                                                                                                                                            272  counter_fun(),
                                                                                                                                            -
                                                                                                                                            273  params_last(Model_.params_last),
                                                                                                                                            -
                                                                                                                                            274  normalizing_constants(Model_.normalizing_constants),
                                                                                                                                            -
                                                                                                                                            275  first_calc_done(Model_.first_calc_done),
                                                                                                                                            -
                                                                                                                                            276  delete_counters(true),
                                                                                                                                            -
                                                                                                                                            277  delete_rules(true),
                                                                                                                                            -
                                                                                                                                            278  delete_rules_dyn(true),
                                                                                                                                            -
                                                                                                                                            279  transform_model_fun(Model_.transform_model_fun),
                                                                                                                                            -
                                                                                                                                            280  transform_model_term_names(Model_.transform_model_term_names)
                                                                                                                                            -
                                                                                                                                            281  {
                                                                                                                                            -
                                                                                                                                            282 
                                                                                                                                            -
                                                                                                                                            283  // Counters are shared
                                                                                                                                            -
                                                                                                                                            284  support_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            285  counter_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            286 
                                                                                                                                            -
                                                                                                                                            287  // Rules are shared
                                                                                                                                            -
                                                                                                                                            288  support_fun.set_rules(rules);
                                                                                                                                            -
                                                                                                                                            289  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            -
                                                                                                                                            290 
                                                                                                                                            -
                                                                                                                                            291  return;
                                                                                                                                            -
                                                                                                                                            292 
                                                                                                                                            -
                                                                                                                                            293 }
                                                                                                                                            -
                                                                                                                                            294 
                                                                                                                                            -
                                                                                                                                            295 template <
                                                                                                                                            -
                                                                                                                                            296  typename Array_Type,
                                                                                                                                            -
                                                                                                                                            297  typename Data_Counter_Type,
                                                                                                                                            -
                                                                                                                                            298  typename Data_Rule_Type,
                                                                                                                                            -
                                                                                                                                            299  typename Data_Rule_Dyn_Type
                                                                                                                                            -
                                                                                                                                            300  >
                                                                                                                                            - - - -
                                                                                                                                            304 ) {
                                                                                                                                            -
                                                                                                                                            305 
                                                                                                                                            -
                                                                                                                                            306  // Clearing
                                                                                                                                            -
                                                                                                                                            307  if (this != &Model_) {
                                                                                                                                            -
                                                                                                                                            308 
                                                                                                                                            -
                                                                                                                                            309  if (delete_counters)
                                                                                                                                            -
                                                                                                                                            310  delete counters;
                                                                                                                                            -
                                                                                                                                            311 
                                                                                                                                            -
                                                                                                                                            312  if (delete_rules)
                                                                                                                                            -
                                                                                                                                            313  delete rules;
                                                                                                                                            -
                                                                                                                                            314 
                                                                                                                                            -
                                                                                                                                            315  if (delete_rules_dyn)
                                                                                                                                            -
                                                                                                                                            316  delete rules_dyn;
                                                                                                                                            -
                                                                                                                                            317 
                                                                                                                                            -
                                                                                                                                            318  stats_support = Model_.stats_support;
                                                                                                                                            -
                                                                                                                                            319  stats_support_n_arrays = Model_.stats_support_n_arrays;
                                                                                                                                            -
                                                                                                                                            320  stats_target = Model_.stats_target;
                                                                                                                                            -
                                                                                                                                            321  arrays2support = Model_.arrays2support;
                                                                                                                                            -
                                                                                                                                            322  keys2support = Model_.keys2support;
                                                                                                                                            -
                                                                                                                                            323  pset_arrays = Model_.pset_arrays;
                                                                                                                                            -
                                                                                                                                            324  pset_stats = Model_.pset_stats;
                                                                                                                                            - -
                                                                                                                                            326  rules = new Rules<Array_Type,Data_Rule_Type>(*(Model_.rules));
                                                                                                                                            -
                                                                                                                                            327  rules_dyn = new Rules<Array_Type,Data_Rule_Dyn_Type>(*(Model_.rules_dyn));
                                                                                                                                            -
                                                                                                                                            328  delete_counters = true;
                                                                                                                                            -
                                                                                                                                            329  delete_rules = true;
                                                                                                                                            -
                                                                                                                                            330  delete_rules_dyn = true;
                                                                                                                                            -
                                                                                                                                            331  params_last = Model_.params_last;
                                                                                                                                            -
                                                                                                                                            332  normalizing_constants = Model_.normalizing_constants;
                                                                                                                                            -
                                                                                                                                            333  first_calc_done = Model_.first_calc_done;
                                                                                                                                            -
                                                                                                                                            334  transform_model_fun = Model_.transform_model_fun;
                                                                                                                                            -
                                                                                                                                            335  transform_model_term_names = Model_.transform_model_term_names;
                                                                                                                                            -
                                                                                                                                            336 
                                                                                                                                            -
                                                                                                                                            337  // Counters are shared
                                                                                                                                            -
                                                                                                                                            338  support_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            339  counter_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            340 
                                                                                                                                            -
                                                                                                                                            341  // Rules are shared
                                                                                                                                            -
                                                                                                                                            342  support_fun.set_rules(rules);
                                                                                                                                            -
                                                                                                                                            343  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            -
                                                                                                                                            344 
                                                                                                                                            -
                                                                                                                                            345  }
                                                                                                                                            -
                                                                                                                                            346 
                                                                                                                                            -
                                                                                                                                            347  return *this;
                                                                                                                                            -
                                                                                                                                            348 
                                                                                                                                            +
                                                                                                                                            154  first_calc_done[i] = true;
                                                                                                                                            +
                                                                                                                                            155  normalizing_constants[i] = update_normalizing_constant(
                                                                                                                                            +
                                                                                                                                            156  params, &stats_support[i][0u], k, n
                                                                                                                                            +
                                                                                                                                            157  );
                                                                                                                                            +
                                                                                                                                            158 
                                                                                                                                            +
                                                                                                                                            159  }
                                                                                                                                            +
                                                                                                                                            160 
                                                                                                                                            +
                                                                                                                                            161  return;
                                                                                                                                            +
                                                                                                                                            162 
                                                                                                                                            +
                                                                                                                                            163 }
                                                                                                                                            +
                                                                                                                                            164 
                                                                                                                                            +
                                                                                                                                            165 template <
                                                                                                                                            +
                                                                                                                                            166  typename Array_Type,
                                                                                                                                            +
                                                                                                                                            167  typename Data_Counter_Type,
                                                                                                                                            +
                                                                                                                                            168  typename Data_Rule_Type,
                                                                                                                                            +
                                                                                                                                            169  typename Data_Rule_Dyn_Type
                                                                                                                                            +
                                                                                                                                            170  >
                                                                                                                                            + +
                                                                                                                                            172  stats_support(0u),
                                                                                                                                            +
                                                                                                                                            173  stats_support_n_arrays(0u),
                                                                                                                                            +
                                                                                                                                            174  stats_target(0u), arrays2support(0u),
                                                                                                                                            +
                                                                                                                                            175  keys2support(0u),
                                                                                                                                            +
                                                                                                                                            176  pset_arrays(0u), pset_stats(0u),
                                                                                                                                            +
                                                                                                                                            177  counters(new Counters<Array_Type,Data_Counter_Type>()),
                                                                                                                                            +
                                                                                                                                            178  rules(new Rules<Array_Type,Data_Rule_Type>()),
                                                                                                                                            +
                                                                                                                                            179  rules_dyn(new Rules<Array_Type,Data_Rule_Dyn_Type>()),
                                                                                                                                            +
                                                                                                                                            180  support_fun(), counter_fun(), delete_counters(true),
                                                                                                                                            +
                                                                                                                                            181  delete_rules(true),
                                                                                                                                            +
                                                                                                                                            182  delete_rules_dyn(true),
                                                                                                                                            +
                                                                                                                                            183  transform_model_fun(nullptr),
                                                                                                                                            +
                                                                                                                                            184  transform_model_term_names(0u)
                                                                                                                                            +
                                                                                                                                            185 {
                                                                                                                                            +
                                                                                                                                            186 
                                                                                                                                            +
                                                                                                                                            187  // Counters are shared
                                                                                                                                            +
                                                                                                                                            188  support_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            189  counter_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            190 
                                                                                                                                            +
                                                                                                                                            191  // Rules are shared
                                                                                                                                            +
                                                                                                                                            192  support_fun.set_rules(rules);
                                                                                                                                            +
                                                                                                                                            193  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            +
                                                                                                                                            194 
                                                                                                                                            +
                                                                                                                                            195  return;
                                                                                                                                            +
                                                                                                                                            196 
                                                                                                                                            +
                                                                                                                                            197 }
                                                                                                                                            +
                                                                                                                                            198 
                                                                                                                                            +
                                                                                                                                            199 template <
                                                                                                                                            +
                                                                                                                                            200  typename Array_Type,
                                                                                                                                            +
                                                                                                                                            201  typename Data_Counter_Type,
                                                                                                                                            +
                                                                                                                                            202  typename Data_Rule_Type,
                                                                                                                                            +
                                                                                                                                            203  typename Data_Rule_Dyn_Type
                                                                                                                                            +
                                                                                                                                            204  >
                                                                                                                                            + +
                                                                                                                                            206  size_t size_
                                                                                                                                            +
                                                                                                                                            207  ) :
                                                                                                                                            +
                                                                                                                                            208  stats_support(0u),
                                                                                                                                            +
                                                                                                                                            209  stats_support_n_arrays(0u),
                                                                                                                                            +
                                                                                                                                            210  stats_target(0u), arrays2support(0u), keys2support(0u),
                                                                                                                                            +
                                                                                                                                            211  pset_arrays(0u), pset_stats(0u),
                                                                                                                                            +
                                                                                                                                            212  counters(new Counters<Array_Type,Data_Counter_Type>()),
                                                                                                                                            +
                                                                                                                                            213  rules(new Rules<Array_Type,Data_Rule_Type>()),
                                                                                                                                            +
                                                                                                                                            214  rules_dyn(new Rules<Array_Type,Data_Rule_Dyn_Type>()),
                                                                                                                                            +
                                                                                                                                            215  support_fun(), counter_fun(), delete_counters(true),
                                                                                                                                            +
                                                                                                                                            216  delete_rules(true),
                                                                                                                                            +
                                                                                                                                            217  delete_rules_dyn(true),
                                                                                                                                            +
                                                                                                                                            218  transform_model_fun(nullptr),
                                                                                                                                            +
                                                                                                                                            219  transform_model_term_names(0u)
                                                                                                                                            +
                                                                                                                                            220 {
                                                                                                                                            +
                                                                                                                                            221 
                                                                                                                                            +
                                                                                                                                            222  stats_target.reserve(size_);
                                                                                                                                            +
                                                                                                                                            223  arrays2support.reserve(size_);
                                                                                                                                            +
                                                                                                                                            224 
                                                                                                                                            +
                                                                                                                                            225  // Counters are shared
                                                                                                                                            +
                                                                                                                                            226  support_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            227  counter_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            228 
                                                                                                                                            +
                                                                                                                                            229  // Rules are shared
                                                                                                                                            +
                                                                                                                                            230  support_fun.set_rules(rules);
                                                                                                                                            +
                                                                                                                                            231  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            +
                                                                                                                                            232 
                                                                                                                                            +
                                                                                                                                            233  return;
                                                                                                                                            +
                                                                                                                                            234 
                                                                                                                                            +
                                                                                                                                            235 }
                                                                                                                                            +
                                                                                                                                            236 
                                                                                                                                            +
                                                                                                                                            237 template <
                                                                                                                                            +
                                                                                                                                            238  typename Array_Type,
                                                                                                                                            +
                                                                                                                                            239  typename Data_Counter_Type,
                                                                                                                                            +
                                                                                                                                            240  typename Data_Rule_Type,
                                                                                                                                            +
                                                                                                                                            241  typename Data_Rule_Dyn_Type
                                                                                                                                            +
                                                                                                                                            242  >
                                                                                                                                            + + +
                                                                                                                                            245  ) :
                                                                                                                                            +
                                                                                                                                            246  stats_support(Model_.stats_support),
                                                                                                                                            +
                                                                                                                                            247  stats_support_n_arrays(Model_.stats_support_n_arrays),
                                                                                                                                            +
                                                                                                                                            248  stats_target(Model_.stats_target),
                                                                                                                                            +
                                                                                                                                            249  arrays2support(Model_.arrays2support),
                                                                                                                                            +
                                                                                                                                            250  keys2support(Model_.keys2support),
                                                                                                                                            +
                                                                                                                                            251  pset_arrays(Model_.pset_arrays),
                                                                                                                                            +
                                                                                                                                            252  pset_stats(Model_.pset_stats),
                                                                                                                                            +
                                                                                                                                            253  counters(new Counters<Array_Type,Data_Counter_Type>(*(Model_.counters))),
                                                                                                                                            +
                                                                                                                                            254  rules(new Rules<Array_Type,Data_Rule_Type>(*(Model_.rules))),
                                                                                                                                            +
                                                                                                                                            255  rules_dyn(new Rules<Array_Type,Data_Rule_Dyn_Type>(*(Model_.rules_dyn))),
                                                                                                                                            +
                                                                                                                                            256  support_fun(),
                                                                                                                                            +
                                                                                                                                            257  counter_fun(),
                                                                                                                                            +
                                                                                                                                            258  params_last(Model_.params_last),
                                                                                                                                            +
                                                                                                                                            259  normalizing_constants(Model_.normalizing_constants),
                                                                                                                                            +
                                                                                                                                            260  first_calc_done(Model_.first_calc_done),
                                                                                                                                            +
                                                                                                                                            261  delete_counters(true),
                                                                                                                                            +
                                                                                                                                            262  delete_rules(true),
                                                                                                                                            +
                                                                                                                                            263  delete_rules_dyn(true),
                                                                                                                                            +
                                                                                                                                            264  transform_model_fun(Model_.transform_model_fun),
                                                                                                                                            +
                                                                                                                                            265  transform_model_term_names(Model_.transform_model_term_names)
                                                                                                                                            +
                                                                                                                                            266  {
                                                                                                                                            +
                                                                                                                                            267 
                                                                                                                                            +
                                                                                                                                            268  // Counters are shared
                                                                                                                                            +
                                                                                                                                            269  support_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            270  counter_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            271 
                                                                                                                                            +
                                                                                                                                            272  // Rules are shared
                                                                                                                                            +
                                                                                                                                            273  support_fun.set_rules(rules);
                                                                                                                                            +
                                                                                                                                            274  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            +
                                                                                                                                            275 
                                                                                                                                            +
                                                                                                                                            276  return;
                                                                                                                                            +
                                                                                                                                            277 
                                                                                                                                            +
                                                                                                                                            278 }
                                                                                                                                            +
                                                                                                                                            279 
                                                                                                                                            +
                                                                                                                                            280 template <
                                                                                                                                            +
                                                                                                                                            281  typename Array_Type,
                                                                                                                                            +
                                                                                                                                            282  typename Data_Counter_Type,
                                                                                                                                            +
                                                                                                                                            283  typename Data_Rule_Type,
                                                                                                                                            +
                                                                                                                                            284  typename Data_Rule_Dyn_Type
                                                                                                                                            +
                                                                                                                                            285  >
                                                                                                                                            + + + +
                                                                                                                                            289 ) {
                                                                                                                                            +
                                                                                                                                            290 
                                                                                                                                            +
                                                                                                                                            291  // Clearing
                                                                                                                                            +
                                                                                                                                            292  if (this != &Model_) {
                                                                                                                                            +
                                                                                                                                            293 
                                                                                                                                            +
                                                                                                                                            294  if (delete_counters)
                                                                                                                                            +
                                                                                                                                            295  delete counters;
                                                                                                                                            +
                                                                                                                                            296 
                                                                                                                                            +
                                                                                                                                            297  if (delete_rules)
                                                                                                                                            +
                                                                                                                                            298  delete rules;
                                                                                                                                            +
                                                                                                                                            299 
                                                                                                                                            +
                                                                                                                                            300  if (delete_rules_dyn)
                                                                                                                                            +
                                                                                                                                            301  delete rules_dyn;
                                                                                                                                            +
                                                                                                                                            302 
                                                                                                                                            +
                                                                                                                                            303  stats_support = Model_.stats_support;
                                                                                                                                            +
                                                                                                                                            304  stats_support_n_arrays = Model_.stats_support_n_arrays;
                                                                                                                                            +
                                                                                                                                            305  stats_target = Model_.stats_target;
                                                                                                                                            +
                                                                                                                                            306  arrays2support = Model_.arrays2support;
                                                                                                                                            +
                                                                                                                                            307  keys2support = Model_.keys2support;
                                                                                                                                            +
                                                                                                                                            308  pset_arrays = Model_.pset_arrays;
                                                                                                                                            +
                                                                                                                                            309  pset_stats = Model_.pset_stats;
                                                                                                                                            + +
                                                                                                                                            311  rules = new Rules<Array_Type,Data_Rule_Type>(*(Model_.rules));
                                                                                                                                            +
                                                                                                                                            312  rules_dyn = new Rules<Array_Type,Data_Rule_Dyn_Type>(*(Model_.rules_dyn));
                                                                                                                                            +
                                                                                                                                            313  delete_counters = true;
                                                                                                                                            +
                                                                                                                                            314  delete_rules = true;
                                                                                                                                            +
                                                                                                                                            315  delete_rules_dyn = true;
                                                                                                                                            +
                                                                                                                                            316  params_last = Model_.params_last;
                                                                                                                                            +
                                                                                                                                            317  normalizing_constants = Model_.normalizing_constants;
                                                                                                                                            +
                                                                                                                                            318  first_calc_done = Model_.first_calc_done;
                                                                                                                                            +
                                                                                                                                            319  transform_model_fun = Model_.transform_model_fun;
                                                                                                                                            +
                                                                                                                                            320  transform_model_term_names = Model_.transform_model_term_names;
                                                                                                                                            +
                                                                                                                                            321 
                                                                                                                                            +
                                                                                                                                            322  // Counters are shared
                                                                                                                                            +
                                                                                                                                            323  support_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            324  counter_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            325 
                                                                                                                                            +
                                                                                                                                            326  // Rules are shared
                                                                                                                                            +
                                                                                                                                            327  support_fun.set_rules(rules);
                                                                                                                                            +
                                                                                                                                            328  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            +
                                                                                                                                            329 
                                                                                                                                            +
                                                                                                                                            330  }
                                                                                                                                            +
                                                                                                                                            331 
                                                                                                                                            +
                                                                                                                                            332  return *this;
                                                                                                                                            +
                                                                                                                                            333 
                                                                                                                                            +
                                                                                                                                            334 }
                                                                                                                                            +
                                                                                                                                            335 
                                                                                                                                            +
                                                                                                                                            336 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            338  // if (with_pset)
                                                                                                                                            +
                                                                                                                                            339  // throw std::logic_error("Powerset storage alreay activated.");
                                                                                                                                            +
                                                                                                                                            340  with_pset = true;
                                                                                                                                            +
                                                                                                                                            341  return;
                                                                                                                                            +
                                                                                                                                            342 }
                                                                                                                                            +
                                                                                                                                            343 
                                                                                                                                            +
                                                                                                                                            344 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            346  const Array_Type & Array_
                                                                                                                                            +
                                                                                                                                            347 ) {
                                                                                                                                            +
                                                                                                                                            348  return this->counters->gen_hash(Array_);
                                                                                                                                            349 }
                                                                                                                                            350 
                                                                                                                                            351 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            353  // if (with_pset)
                                                                                                                                            -
                                                                                                                                            354  // throw std::logic_error("Powerset storage alreay activated.");
                                                                                                                                            -
                                                                                                                                            355  with_pset = true;
                                                                                                                                            -
                                                                                                                                            356  return;
                                                                                                                                            -
                                                                                                                                            357 }
                                                                                                                                            -
                                                                                                                                            358 
                                                                                                                                            -
                                                                                                                                            359 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            361  const Array_Type & Array_
                                                                                                                                            -
                                                                                                                                            362 ) {
                                                                                                                                            -
                                                                                                                                            363  return this->counters->gen_hash(Array_);
                                                                                                                                            -
                                                                                                                                            364 }
                                                                                                                                            -
                                                                                                                                            365 
                                                                                                                                            -
                                                                                                                                            366 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            369 ) {
                                                                                                                                            -
                                                                                                                                            370 
                                                                                                                                            -
                                                                                                                                            371  counters->add_counter(counter, Data_Counter_Type());
                                                                                                                                            -
                                                                                                                                            372  return;
                                                                                                                                            -
                                                                                                                                            373 }
                                                                                                                                            -
                                                                                                                                            374 
                                                                                                                                            -
                                                                                                                                            375 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - - -
                                                                                                                                            379  Data_Counter_Type data_
                                                                                                                                            + + +
                                                                                                                                            354 ) {
                                                                                                                                            +
                                                                                                                                            355 
                                                                                                                                            +
                                                                                                                                            356  counters->add_counter(counter, Data_Counter_Type());
                                                                                                                                            +
                                                                                                                                            357  return;
                                                                                                                                            +
                                                                                                                                            358 }
                                                                                                                                            +
                                                                                                                                            359 
                                                                                                                                            +
                                                                                                                                            360 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + + +
                                                                                                                                            364  Data_Counter_Type data_
                                                                                                                                            +
                                                                                                                                            365 ) {
                                                                                                                                            +
                                                                                                                                            366 
                                                                                                                                            +
                                                                                                                                            367  counters->add_counter(
                                                                                                                                            +
                                                                                                                                            368  count_fun_,
                                                                                                                                            +
                                                                                                                                            369  init_fun_,
                                                                                                                                            +
                                                                                                                                            370  data_
                                                                                                                                            +
                                                                                                                                            371  );
                                                                                                                                            +
                                                                                                                                            372 
                                                                                                                                            +
                                                                                                                                            373  return;
                                                                                                                                            +
                                                                                                                                            374 
                                                                                                                                            +
                                                                                                                                            375 }
                                                                                                                                            +
                                                                                                                                            376 
                                                                                                                                            +
                                                                                                                                            377 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            380 ) {
                                                                                                                                            -
                                                                                                                                            381 
                                                                                                                                            -
                                                                                                                                            382  counters->add_counter(
                                                                                                                                            -
                                                                                                                                            383  count_fun_,
                                                                                                                                            -
                                                                                                                                            384  init_fun_,
                                                                                                                                            -
                                                                                                                                            385  data_
                                                                                                                                            -
                                                                                                                                            386  );
                                                                                                                                            -
                                                                                                                                            387 
                                                                                                                                            -
                                                                                                                                            388  return;
                                                                                                                                            -
                                                                                                                                            389 
                                                                                                                                            -
                                                                                                                                            390 }
                                                                                                                                            -
                                                                                                                                            391 
                                                                                                                                            -
                                                                                                                                            392 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            395 ) {
                                                                                                                                            -
                                                                                                                                            396 
                                                                                                                                            -
                                                                                                                                            397  if (delete_counters) {
                                                                                                                                            -
                                                                                                                                            398  delete counters;
                                                                                                                                            -
                                                                                                                                            399  delete_counters = false;
                                                                                                                                            -
                                                                                                                                            400  }
                                                                                                                                            -
                                                                                                                                            401 
                                                                                                                                            -
                                                                                                                                            402  this->counters = counters_;
                                                                                                                                            -
                                                                                                                                            403  support_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            404  counter_fun.set_counters(counters);
                                                                                                                                            -
                                                                                                                                            405 
                                                                                                                                            -
                                                                                                                                            406  return;
                                                                                                                                            -
                                                                                                                                            407 
                                                                                                                                            -
                                                                                                                                            408 }
                                                                                                                                            -
                                                                                                                                            409 
                                                                                                                                            -
                                                                                                                                            410 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            413 ) {
                                                                                                                                            +
                                                                                                                                            381 
                                                                                                                                            +
                                                                                                                                            382  if (delete_counters) {
                                                                                                                                            +
                                                                                                                                            383  delete counters;
                                                                                                                                            +
                                                                                                                                            384  delete_counters = false;
                                                                                                                                            +
                                                                                                                                            385  }
                                                                                                                                            +
                                                                                                                                            386 
                                                                                                                                            +
                                                                                                                                            387  this->counters = counters_;
                                                                                                                                            +
                                                                                                                                            388  support_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            389  counter_fun.set_counters(counters);
                                                                                                                                            +
                                                                                                                                            390 
                                                                                                                                            +
                                                                                                                                            391  return;
                                                                                                                                            +
                                                                                                                                            392 
                                                                                                                                            +
                                                                                                                                            393 }
                                                                                                                                            +
                                                                                                                                            394 
                                                                                                                                            +
                                                                                                                                            395 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            398 ) {
                                                                                                                                            +
                                                                                                                                            399 
                                                                                                                                            +
                                                                                                                                            400  counters->add_hash(fun_);
                                                                                                                                            +
                                                                                                                                            401 
                                                                                                                                            +
                                                                                                                                            402 }
                                                                                                                                            +
                                                                                                                                            403 
                                                                                                                                            +
                                                                                                                                            405 
                                                                                                                                            +
                                                                                                                                            406 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            409 ) {
                                                                                                                                            +
                                                                                                                                            410 
                                                                                                                                            +
                                                                                                                                            411  rules->add_rule(rules, Data_Rule_Type());
                                                                                                                                            +
                                                                                                                                            412  return;
                                                                                                                                            +
                                                                                                                                            413 }
                                                                                                                                            414 
                                                                                                                                            -
                                                                                                                                            415  counters->add_hash(fun_);
                                                                                                                                            -
                                                                                                                                            416 
                                                                                                                                            -
                                                                                                                                            417 }
                                                                                                                                            -
                                                                                                                                            418 
                                                                                                                                            +
                                                                                                                                            415 
                                                                                                                                            +
                                                                                                                                            416 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            419 ) {
                                                                                                                                            420 
                                                                                                                                            -
                                                                                                                                            421 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            424 ) {
                                                                                                                                            -
                                                                                                                                            425 
                                                                                                                                            -
                                                                                                                                            426  rules->add_rule(rules, Data_Rule_Type());
                                                                                                                                            -
                                                                                                                                            427  return;
                                                                                                                                            -
                                                                                                                                            428 }
                                                                                                                                            +
                                                                                                                                            421  if (delete_rules)
                                                                                                                                            +
                                                                                                                                            422  delete rules;
                                                                                                                                            +
                                                                                                                                            423 
                                                                                                                                            +
                                                                                                                                            424  this->rules = rules_;
                                                                                                                                            +
                                                                                                                                            425  this->delete_rules = false;
                                                                                                                                            +
                                                                                                                                            426 
                                                                                                                                            +
                                                                                                                                            427  support_fun.set_rules(rules);
                                                                                                                                            +
                                                                                                                                            428  return;
                                                                                                                                            429 
                                                                                                                                            -
                                                                                                                                            430 
                                                                                                                                            -
                                                                                                                                            431 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            434 ) {
                                                                                                                                            -
                                                                                                                                            435 
                                                                                                                                            -
                                                                                                                                            436  if (delete_rules)
                                                                                                                                            -
                                                                                                                                            437  delete rules;
                                                                                                                                            -
                                                                                                                                            438 
                                                                                                                                            -
                                                                                                                                            439  this->rules = rules_;
                                                                                                                                            -
                                                                                                                                            440  this->delete_rules = false;
                                                                                                                                            -
                                                                                                                                            441 
                                                                                                                                            -
                                                                                                                                            442  support_fun.set_rules(rules);
                                                                                                                                            -
                                                                                                                                            443  return;
                                                                                                                                            -
                                                                                                                                            444 
                                                                                                                                            -
                                                                                                                                            445 }
                                                                                                                                            -
                                                                                                                                            446 
                                                                                                                                            -
                                                                                                                                            448 
                                                                                                                                            -
                                                                                                                                            449 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            452 ) {
                                                                                                                                            +
                                                                                                                                            430 }
                                                                                                                                            +
                                                                                                                                            431 
                                                                                                                                            +
                                                                                                                                            433 
                                                                                                                                            +
                                                                                                                                            434 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            437 ) {
                                                                                                                                            +
                                                                                                                                            438 
                                                                                                                                            +
                                                                                                                                            439  rules_dyn->add_rule(rules_, Data_Rule_Dyn_Type());
                                                                                                                                            +
                                                                                                                                            440  return;
                                                                                                                                            +
                                                                                                                                            441 }
                                                                                                                                            +
                                                                                                                                            442 
                                                                                                                                            +
                                                                                                                                            443 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            446  Data_Rule_Dyn_Type data_
                                                                                                                                            +
                                                                                                                                            447 ) {
                                                                                                                                            +
                                                                                                                                            448 
                                                                                                                                            +
                                                                                                                                            449  rules_dyn->add_rule(
                                                                                                                                            +
                                                                                                                                            450  rule_fun_,
                                                                                                                                            +
                                                                                                                                            451  data_
                                                                                                                                            +
                                                                                                                                            452  );
                                                                                                                                            453 
                                                                                                                                            -
                                                                                                                                            454  rules_dyn->add_rule(rules_, Data_Rule_Dyn_Type());
                                                                                                                                            -
                                                                                                                                            455  return;
                                                                                                                                            +
                                                                                                                                            454  return;
                                                                                                                                            +
                                                                                                                                            455 
                                                                                                                                            456 }
                                                                                                                                            457 
                                                                                                                                            458 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            461  Data_Rule_Dyn_Type data_
                                                                                                                                            -
                                                                                                                                            462 ) {
                                                                                                                                            -
                                                                                                                                            463 
                                                                                                                                            -
                                                                                                                                            464  rules_dyn->add_rule(
                                                                                                                                            -
                                                                                                                                            465  rule_fun_,
                                                                                                                                            -
                                                                                                                                            466  data_
                                                                                                                                            -
                                                                                                                                            467  );
                                                                                                                                            -
                                                                                                                                            468 
                                                                                                                                            + + +
                                                                                                                                            461 ) {
                                                                                                                                            +
                                                                                                                                            462 
                                                                                                                                            +
                                                                                                                                            463  if (delete_rules_dyn)
                                                                                                                                            +
                                                                                                                                            464  delete rules_dyn;
                                                                                                                                            +
                                                                                                                                            465 
                                                                                                                                            +
                                                                                                                                            466  this->rules_dyn = rules_;
                                                                                                                                            +
                                                                                                                                            467  this->delete_rules_dyn = false;
                                                                                                                                            +
                                                                                                                                            468  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            469  return;
                                                                                                                                            -
                                                                                                                                            470 
                                                                                                                                            +
                                                                                                                                            470 
                                                                                                                                            471 }
                                                                                                                                            472 
                                                                                                                                            -
                                                                                                                                            473 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            476 ) {
                                                                                                                                            -
                                                                                                                                            477 
                                                                                                                                            -
                                                                                                                                            478  if (delete_rules_dyn)
                                                                                                                                            -
                                                                                                                                            479  delete rules_dyn;
                                                                                                                                            -
                                                                                                                                            480 
                                                                                                                                            -
                                                                                                                                            481  this->rules_dyn = rules_;
                                                                                                                                            -
                                                                                                                                            482  this->delete_rules_dyn = false;
                                                                                                                                            -
                                                                                                                                            483  support_fun.set_rules_dyn(rules_dyn);
                                                                                                                                            -
                                                                                                                                            484  return;
                                                                                                                                            -
                                                                                                                                            485 
                                                                                                                                            -
                                                                                                                                            486 }
                                                                                                                                            -
                                                                                                                                            487 
                                                                                                                                            -
                                                                                                                                            489 
                                                                                                                                            -
                                                                                                                                            490 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            492  const Array_Type & Array_,
                                                                                                                                            -
                                                                                                                                            493  bool force_new
                                                                                                                                            -
                                                                                                                                            494 ) {
                                                                                                                                            -
                                                                                                                                            495 
                                                                                                                                            -
                                                                                                                                            496  // Array counts (target statistics)
                                                                                                                                            -
                                                                                                                                            497  counter_fun.reset_array(&Array_);
                                                                                                                                            -
                                                                                                                                            498 
                                                                                                                                            -
                                                                                                                                            499  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            474 
                                                                                                                                            +
                                                                                                                                            475 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            477  const Array_Type & Array_,
                                                                                                                                            +
                                                                                                                                            478  bool force_new
                                                                                                                                            +
                                                                                                                                            479 ) {
                                                                                                                                            +
                                                                                                                                            480 
                                                                                                                                            +
                                                                                                                                            481  // Array counts (target statistics)
                                                                                                                                            +
                                                                                                                                            482  counter_fun.reset_array(&Array_);
                                                                                                                                            +
                                                                                                                                            483 
                                                                                                                                            +
                                                                                                                                            484  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            485  {
                                                                                                                                            +
                                                                                                                                            486 
                                                                                                                                            +
                                                                                                                                            487  auto tmpcounts = counter_fun.count_all();
                                                                                                                                            +
                                                                                                                                            488  stats_target.emplace_back(
                                                                                                                                            +
                                                                                                                                            489  transform_model_fun(&tmpcounts[0u], tmpcounts.size())
                                                                                                                                            +
                                                                                                                                            490  );
                                                                                                                                            +
                                                                                                                                            491 
                                                                                                                                            +
                                                                                                                                            492  } else
                                                                                                                                            +
                                                                                                                                            493  stats_target.push_back(counter_fun.count_all());
                                                                                                                                            +
                                                                                                                                            494 
                                                                                                                                            +
                                                                                                                                            495  // If the data hasn't been analyzed earlier, then we need to compute
                                                                                                                                            +
                                                                                                                                            496  // the support
                                                                                                                                            +
                                                                                                                                            497  std::vector< double > key = counters->gen_hash(Array_);
                                                                                                                                            +
                                                                                                                                            498  MapVec_type< double, size_t >::const_iterator locator = keys2support.find(key);
                                                                                                                                            +
                                                                                                                                            499  if (force_new | (locator == keys2support.end()))
                                                                                                                                            500  {
                                                                                                                                            501 
                                                                                                                                            -
                                                                                                                                            502  auto tmpcounts = counter_fun.count_all();
                                                                                                                                            -
                                                                                                                                            503  stats_target.emplace_back(
                                                                                                                                            -
                                                                                                                                            504  transform_model_fun(&tmpcounts[0u], tmpcounts.size())
                                                                                                                                            -
                                                                                                                                            505  );
                                                                                                                                            -
                                                                                                                                            506 
                                                                                                                                            -
                                                                                                                                            507  } else
                                                                                                                                            -
                                                                                                                                            508  stats_target.push_back(counter_fun.count_all());
                                                                                                                                            -
                                                                                                                                            509 
                                                                                                                                            -
                                                                                                                                            510  // If the data hasn't been analyzed earlier, then we need to compute
                                                                                                                                            -
                                                                                                                                            511  // the support
                                                                                                                                            -
                                                                                                                                            512  std::vector< double > key = counters->gen_hash(Array_);
                                                                                                                                            -
                                                                                                                                            513  MapVec_type< double, size_t >::const_iterator locator = keys2support.find(key);
                                                                                                                                            -
                                                                                                                                            514  if (force_new | (locator == keys2support.end()))
                                                                                                                                            -
                                                                                                                                            515  {
                                                                                                                                            -
                                                                                                                                            516 
                                                                                                                                            -
                                                                                                                                            517  // Adding to the map
                                                                                                                                            -
                                                                                                                                            518  keys2support[key] = stats_support.size();
                                                                                                                                            -
                                                                                                                                            519  stats_support_n_arrays.push_back(1u); // How many elements now
                                                                                                                                            -
                                                                                                                                            520  arrays2support.push_back(stats_support.size()); // Map of the array id to the support
                                                                                                                                            -
                                                                                                                                            521 
                                                                                                                                            -
                                                                                                                                            522  // Computing support using the counters included in the model
                                                                                                                                            -
                                                                                                                                            523  support_fun.reset_array(Array_);
                                                                                                                                            -
                                                                                                                                            524 
                                                                                                                                            -
                                                                                                                                            527  if (with_pset)
                                                                                                                                            -
                                                                                                                                            528  {
                                                                                                                                            -
                                                                                                                                            529 
                                                                                                                                            -
                                                                                                                                            530  // Making space for storing the support
                                                                                                                                            -
                                                                                                                                            531  pset_arrays.resize(pset_arrays.size() + 1u);
                                                                                                                                            -
                                                                                                                                            532  pset_stats.resize(pset_stats.size() + 1u);
                                                                                                                                            -
                                                                                                                                            533  pset_probs.resize(pset_probs.size() + 1u);
                                                                                                                                            -
                                                                                                                                            534 
                                                                                                                                            -
                                                                                                                                            535  try
                                                                                                                                            -
                                                                                                                                            536  {
                                                                                                                                            -
                                                                                                                                            537 
                                                                                                                                            -
                                                                                                                                            538  support_fun.calc(
                                                                                                                                            -
                                                                                                                                            539  &(pset_arrays[pset_arrays.size() - 1u]),
                                                                                                                                            -
                                                                                                                                            540  &(pset_stats[pset_stats.size() - 1u])
                                                                                                                                            -
                                                                                                                                            541  );
                                                                                                                                            -
                                                                                                                                            542 
                                                                                                                                            -
                                                                                                                                            543  }
                                                                                                                                            -
                                                                                                                                            544  catch (const std::exception& e)
                                                                                                                                            -
                                                                                                                                            545  {
                                                                                                                                            -
                                                                                                                                            546 
                                                                                                                                            -
                                                                                                                                            547  printf_barry(
                                                                                                                                            -
                                                                                                                                            548  "A problem ocurred while trying to add the array (and recording the powerset). "
                                                                                                                                            -
                                                                                                                                            549  );
                                                                                                                                            -
                                                                                                                                            550  printf_barry("with error %s\n", e.what());
                                                                                                                                            -
                                                                                                                                            551  printf_barry("Here is the array that generated the error.\n");
                                                                                                                                            -
                                                                                                                                            552  Array_.print();
                                                                                                                                            -
                                                                                                                                            553  throw std::logic_error("");
                                                                                                                                            -
                                                                                                                                            554 
                                                                                                                                            -
                                                                                                                                            555  }
                                                                                                                                            -
                                                                                                                                            556 
                                                                                                                                            -
                                                                                                                                            557  }
                                                                                                                                            -
                                                                                                                                            558  else
                                                                                                                                            -
                                                                                                                                            559  {
                                                                                                                                            -
                                                                                                                                            560  try
                                                                                                                                            -
                                                                                                                                            561  {
                                                                                                                                            -
                                                                                                                                            562 
                                                                                                                                            -
                                                                                                                                            563  support_fun.calc();
                                                                                                                                            -
                                                                                                                                            564 
                                                                                                                                            -
                                                                                                                                            565  }
                                                                                                                                            -
                                                                                                                                            566  catch (const std::exception& e)
                                                                                                                                            -
                                                                                                                                            567  {
                                                                                                                                            -
                                                                                                                                            568 
                                                                                                                                            -
                                                                                                                                            569  printf_barry(
                                                                                                                                            -
                                                                                                                                            570  "A problem ocurred while trying to add the array (and recording the powerset). "
                                                                                                                                            -
                                                                                                                                            571  );
                                                                                                                                            -
                                                                                                                                            572  printf_barry("with error %s\n", e.what());
                                                                                                                                            -
                                                                                                                                            573  printf_barry("Here is the array that generated the error.\n");
                                                                                                                                            -
                                                                                                                                            574  Array_.print();
                                                                                                                                            -
                                                                                                                                            575  throw std::logic_error("");
                                                                                                                                            +
                                                                                                                                            502  // Adding to the map
                                                                                                                                            +
                                                                                                                                            503  keys2support[key] = stats_support.size();
                                                                                                                                            +
                                                                                                                                            504  stats_support_n_arrays.push_back(1u); // How many elements now
                                                                                                                                            +
                                                                                                                                            505  arrays2support.push_back(stats_support.size()); // Map of the array id to the support
                                                                                                                                            +
                                                                                                                                            506 
                                                                                                                                            +
                                                                                                                                            507  // Computing support using the counters included in the model
                                                                                                                                            +
                                                                                                                                            508  support_fun.reset_array(Array_);
                                                                                                                                            +
                                                                                                                                            509 
                                                                                                                                            +
                                                                                                                                            512  if (with_pset)
                                                                                                                                            +
                                                                                                                                            513  {
                                                                                                                                            +
                                                                                                                                            514 
                                                                                                                                            +
                                                                                                                                            515  // Making space for storing the support
                                                                                                                                            +
                                                                                                                                            516  pset_arrays.resize(pset_arrays.size() + 1u);
                                                                                                                                            +
                                                                                                                                            517  pset_stats.resize(pset_stats.size() + 1u);
                                                                                                                                            +
                                                                                                                                            518  pset_probs.resize(pset_probs.size() + 1u);
                                                                                                                                            +
                                                                                                                                            519 
                                                                                                                                            +
                                                                                                                                            520  try
                                                                                                                                            +
                                                                                                                                            521  {
                                                                                                                                            +
                                                                                                                                            522 
                                                                                                                                            +
                                                                                                                                            523  support_fun.calc(
                                                                                                                                            +
                                                                                                                                            524  &(pset_arrays[pset_arrays.size() - 1u]),
                                                                                                                                            +
                                                                                                                                            525  &(pset_stats[pset_stats.size() - 1u])
                                                                                                                                            +
                                                                                                                                            526  );
                                                                                                                                            +
                                                                                                                                            527 
                                                                                                                                            +
                                                                                                                                            528  }
                                                                                                                                            +
                                                                                                                                            529  catch (const std::exception& e)
                                                                                                                                            +
                                                                                                                                            530  {
                                                                                                                                            +
                                                                                                                                            531 
                                                                                                                                            +
                                                                                                                                            532  printf_barry(
                                                                                                                                            +
                                                                                                                                            533  "A problem ocurred while trying to add the array (and recording the powerset). "
                                                                                                                                            +
                                                                                                                                            534  );
                                                                                                                                            +
                                                                                                                                            535  printf_barry("with error %s\n", e.what());
                                                                                                                                            +
                                                                                                                                            536  printf_barry("Here is the array that generated the error.\n");
                                                                                                                                            +
                                                                                                                                            537  Array_.print();
                                                                                                                                            +
                                                                                                                                            538  throw std::logic_error("");
                                                                                                                                            +
                                                                                                                                            539 
                                                                                                                                            +
                                                                                                                                            540  }
                                                                                                                                            +
                                                                                                                                            541 
                                                                                                                                            +
                                                                                                                                            542  }
                                                                                                                                            +
                                                                                                                                            543  else
                                                                                                                                            +
                                                                                                                                            544  {
                                                                                                                                            +
                                                                                                                                            545  try
                                                                                                                                            +
                                                                                                                                            546  {
                                                                                                                                            +
                                                                                                                                            547 
                                                                                                                                            +
                                                                                                                                            548  support_fun.calc();
                                                                                                                                            +
                                                                                                                                            549 
                                                                                                                                            +
                                                                                                                                            550  }
                                                                                                                                            +
                                                                                                                                            551  catch (const std::exception& e)
                                                                                                                                            +
                                                                                                                                            552  {
                                                                                                                                            +
                                                                                                                                            553 
                                                                                                                                            +
                                                                                                                                            554  printf_barry(
                                                                                                                                            +
                                                                                                                                            555  "A problem ocurred while trying to add the array (and recording the powerset). "
                                                                                                                                            +
                                                                                                                                            556  );
                                                                                                                                            +
                                                                                                                                            557  printf_barry("with error %s\n", e.what());
                                                                                                                                            +
                                                                                                                                            558  printf_barry("Here is the array that generated the error.\n");
                                                                                                                                            +
                                                                                                                                            559  Array_.print();
                                                                                                                                            +
                                                                                                                                            560  throw std::logic_error("");
                                                                                                                                            +
                                                                                                                                            561 
                                                                                                                                            +
                                                                                                                                            562  }
                                                                                                                                            +
                                                                                                                                            563  }
                                                                                                                                            +
                                                                                                                                            564 
                                                                                                                                            +
                                                                                                                                            565  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            566  {
                                                                                                                                            +
                                                                                                                                            567  auto tmpsupport = support_fun.get_counts();
                                                                                                                                            +
                                                                                                                                            568  size_t k = counter_fun.size();
                                                                                                                                            +
                                                                                                                                            569  size_t n = tmpsupport.size() / (k + 1);
                                                                                                                                            +
                                                                                                                                            570 
                                                                                                                                            +
                                                                                                                                            571  std::vector< double > s_new(0u);
                                                                                                                                            +
                                                                                                                                            572  s_new.reserve(tmpsupport.size());
                                                                                                                                            +
                                                                                                                                            573 
                                                                                                                                            +
                                                                                                                                            574  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            +
                                                                                                                                            575  {
                                                                                                                                            576 
                                                                                                                                            -
                                                                                                                                            577  }
                                                                                                                                            -
                                                                                                                                            578  }
                                                                                                                                            -
                                                                                                                                            579 
                                                                                                                                            -
                                                                                                                                            580  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            581  {
                                                                                                                                            -
                                                                                                                                            582  auto tmpsupport = support_fun.get_counts();
                                                                                                                                            -
                                                                                                                                            583  size_t k = counter_fun.size();
                                                                                                                                            -
                                                                                                                                            584  size_t n = tmpsupport.size() / (k + 1);
                                                                                                                                            +
                                                                                                                                            577  // Appending size
                                                                                                                                            +
                                                                                                                                            578  s_new.push_back(tmpsupport[i * (k + 1u)]);
                                                                                                                                            +
                                                                                                                                            579 
                                                                                                                                            +
                                                                                                                                            580  // Applying transformation and adding to the new set
                                                                                                                                            +
                                                                                                                                            581  auto res = transform_model_fun(&tmpsupport[i * (k + 1u) + 1u], k);
                                                                                                                                            +
                                                                                                                                            582  std::copy(res.begin(), res.end(), std::back_inserter(s_new));
                                                                                                                                            +
                                                                                                                                            583 
                                                                                                                                            +
                                                                                                                                            584  }
                                                                                                                                            585 
                                                                                                                                            -
                                                                                                                                            586  std::vector< double > s_new(0u);
                                                                                                                                            -
                                                                                                                                            587  s_new.reserve(tmpsupport.size());
                                                                                                                                            -
                                                                                                                                            588 
                                                                                                                                            -
                                                                                                                                            589  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            -
                                                                                                                                            590  {
                                                                                                                                            -
                                                                                                                                            591 
                                                                                                                                            -
                                                                                                                                            592  // Appending size
                                                                                                                                            -
                                                                                                                                            593  s_new.push_back(tmpsupport[i * (k + 1u)]);
                                                                                                                                            -
                                                                                                                                            594 
                                                                                                                                            -
                                                                                                                                            595  // Applying transformation and adding to the new set
                                                                                                                                            -
                                                                                                                                            596  auto res = transform_model_fun(&tmpsupport[i * (k + 1u) + 1u], k);
                                                                                                                                            -
                                                                                                                                            597  std::copy(res.begin(), res.end(), std::back_inserter(s_new));
                                                                                                                                            -
                                                                                                                                            598 
                                                                                                                                            -
                                                                                                                                            599  }
                                                                                                                                            -
                                                                                                                                            600 
                                                                                                                                            -
                                                                                                                                            601  stats_support.push_back(s_new);
                                                                                                                                            -
                                                                                                                                            602 
                                                                                                                                            -
                                                                                                                                            603  } else
                                                                                                                                            -
                                                                                                                                            604  stats_support.push_back(support_fun.get_counts());
                                                                                                                                            -
                                                                                                                                            605 
                                                                                                                                            -
                                                                                                                                            606  // Making room for the previous parameters. This will be used to check if
                                                                                                                                            -
                                                                                                                                            607  // the normalizing constant has been updated or not.
                                                                                                                                            -
                                                                                                                                            608  params_last.push_back(stats_target[0u]);
                                                                                                                                            -
                                                                                                                                            609  normalizing_constants.push_back(0.0);
                                                                                                                                            -
                                                                                                                                            610  first_calc_done.push_back(false);
                                                                                                                                            -
                                                                                                                                            611 
                                                                                                                                            -
                                                                                                                                            612  return arrays2support.size() - 1u;
                                                                                                                                            -
                                                                                                                                            613 
                                                                                                                                            -
                                                                                                                                            614  }
                                                                                                                                            -
                                                                                                                                            615 
                                                                                                                                            -
                                                                                                                                            616  // Increasing the number of arrays in that stat
                                                                                                                                            -
                                                                                                                                            617  ++stats_support_n_arrays[locator->second];
                                                                                                                                            +
                                                                                                                                            586  stats_support.push_back(s_new);
                                                                                                                                            +
                                                                                                                                            587 
                                                                                                                                            +
                                                                                                                                            588  } else
                                                                                                                                            +
                                                                                                                                            589  stats_support.push_back(support_fun.get_counts());
                                                                                                                                            +
                                                                                                                                            590 
                                                                                                                                            +
                                                                                                                                            591  // Making room for the previous parameters. This will be used to check if
                                                                                                                                            +
                                                                                                                                            592  // the normalizing constant has been updated or not.
                                                                                                                                            +
                                                                                                                                            593  params_last.push_back(stats_target[0u]);
                                                                                                                                            +
                                                                                                                                            594  normalizing_constants.push_back(0.0);
                                                                                                                                            +
                                                                                                                                            595  first_calc_done.push_back(false);
                                                                                                                                            +
                                                                                                                                            596 
                                                                                                                                            +
                                                                                                                                            597  return arrays2support.size() - 1u;
                                                                                                                                            +
                                                                                                                                            598 
                                                                                                                                            +
                                                                                                                                            599  }
                                                                                                                                            +
                                                                                                                                            600 
                                                                                                                                            +
                                                                                                                                            601  // Increasing the number of arrays in that stat
                                                                                                                                            +
                                                                                                                                            602  ++stats_support_n_arrays[locator->second];
                                                                                                                                            +
                                                                                                                                            603 
                                                                                                                                            +
                                                                                                                                            604  // Adding the corresponding map
                                                                                                                                            +
                                                                                                                                            605  arrays2support.push_back(locator->second);
                                                                                                                                            +
                                                                                                                                            606 
                                                                                                                                            +
                                                                                                                                            607  return arrays2support.size() - 1u;
                                                                                                                                            +
                                                                                                                                            608 
                                                                                                                                            +
                                                                                                                                            609 }
                                                                                                                                            +
                                                                                                                                            610 
                                                                                                                                            +
                                                                                                                                            611 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            613  const std::vector<double> & params,
                                                                                                                                            +
                                                                                                                                            614  const size_t & i,
                                                                                                                                            +
                                                                                                                                            615  bool as_log,
                                                                                                                                            +
                                                                                                                                            616  bool no_update_normconst
                                                                                                                                            +
                                                                                                                                            617 ) {
                                                                                                                                            618 
                                                                                                                                            -
                                                                                                                                            619  // Adding the corresponding map
                                                                                                                                            -
                                                                                                                                            620  arrays2support.push_back(locator->second);
                                                                                                                                            -
                                                                                                                                            621 
                                                                                                                                            -
                                                                                                                                            622  return arrays2support.size() - 1u;
                                                                                                                                            -
                                                                                                                                            623 
                                                                                                                                            -
                                                                                                                                            624 }
                                                                                                                                            -
                                                                                                                                            625 
                                                                                                                                            -
                                                                                                                                            626 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            628  const std::vector<double> & params,
                                                                                                                                            -
                                                                                                                                            629  const size_t & i,
                                                                                                                                            -
                                                                                                                                            630  bool as_log,
                                                                                                                                            -
                                                                                                                                            631  bool no_update_normconst
                                                                                                                                            -
                                                                                                                                            632 ) {
                                                                                                                                            -
                                                                                                                                            633 
                                                                                                                                            -
                                                                                                                                            634  // Checking if the index exists
                                                                                                                                            -
                                                                                                                                            635  if (i >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            636  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            619  // Checking if the index exists
                                                                                                                                            +
                                                                                                                                            620  if (i >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            621  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            622 
                                                                                                                                            +
                                                                                                                                            623  size_t idx = arrays2support[i];
                                                                                                                                            +
                                                                                                                                            624 
                                                                                                                                            +
                                                                                                                                            625  // Checking if this actually has a change of happening
                                                                                                                                            +
                                                                                                                                            626  if (this->stats_support[idx].size() == 0u)
                                                                                                                                            +
                                                                                                                                            627  return as_log ? -std::numeric_limits<double>::infinity() : 0.0;
                                                                                                                                            +
                                                                                                                                            628 
                                                                                                                                            +
                                                                                                                                            629  // Checking if we have updated the normalizing constant or not
                                                                                                                                            +
                                                                                                                                            630  if (!no_update_normconst && (!first_calc_done[idx] || !vec_equal_approx(params, params_last[idx])))
                                                                                                                                            +
                                                                                                                                            631  {
                                                                                                                                            +
                                                                                                                                            632 
                                                                                                                                            +
                                                                                                                                            633  first_calc_done[idx] = true;
                                                                                                                                            +
                                                                                                                                            634 
                                                                                                                                            +
                                                                                                                                            635  size_t k = params.size() + 1u;
                                                                                                                                            +
                                                                                                                                            636  size_t n = stats_support[idx].size() / k;
                                                                                                                                            637 
                                                                                                                                            -
                                                                                                                                            638  size_t idx = arrays2support[i];
                                                                                                                                            -
                                                                                                                                            639 
                                                                                                                                            -
                                                                                                                                            640  // Checking if this actually has a change of happening
                                                                                                                                            -
                                                                                                                                            641  if (this->stats_support[idx].size() == 0u)
                                                                                                                                            -
                                                                                                                                            642  return as_log ? -std::numeric_limits<double>::infinity() : 0.0;
                                                                                                                                            -
                                                                                                                                            643 
                                                                                                                                            -
                                                                                                                                            644  // Checking if we have updated the normalizing constant or not
                                                                                                                                            -
                                                                                                                                            645  if (!no_update_normconst && (!first_calc_done[idx] || !vec_equal_approx(params, params_last[idx])))
                                                                                                                                            -
                                                                                                                                            646  {
                                                                                                                                            -
                                                                                                                                            647 
                                                                                                                                            -
                                                                                                                                            648  first_calc_done[idx] = true;
                                                                                                                                            -
                                                                                                                                            649 
                                                                                                                                            -
                                                                                                                                            650  size_t k = params.size() + 1u;
                                                                                                                                            -
                                                                                                                                            651  size_t n = stats_support[idx].size() / k;
                                                                                                                                            -
                                                                                                                                            652 
                                                                                                                                            -
                                                                                                                                            653  normalizing_constants[idx] = update_normalizing_constant(
                                                                                                                                            -
                                                                                                                                            654  params, &stats_support[idx][0u], k, n
                                                                                                                                            -
                                                                                                                                            655  );
                                                                                                                                            -
                                                                                                                                            656 
                                                                                                                                            -
                                                                                                                                            657  params_last[idx] = params;
                                                                                                                                            -
                                                                                                                                            658 
                                                                                                                                            -
                                                                                                                                            659  }
                                                                                                                                            -
                                                                                                                                            660 
                                                                                                                                            -
                                                                                                                                            661  return likelihood_(
                                                                                                                                            -
                                                                                                                                            662  &stats_target[i],
                                                                                                                                            -
                                                                                                                                            663  params,
                                                                                                                                            -
                                                                                                                                            664  normalizing_constants[idx],
                                                                                                                                            -
                                                                                                                                            665  nterms(),
                                                                                                                                            -
                                                                                                                                            666  as_log
                                                                                                                                            -
                                                                                                                                            667  );
                                                                                                                                            -
                                                                                                                                            668 
                                                                                                                                            -
                                                                                                                                            669 }
                                                                                                                                            +
                                                                                                                                            638  normalizing_constants[idx] = update_normalizing_constant(
                                                                                                                                            +
                                                                                                                                            639  params, &stats_support[idx][0u], k, n
                                                                                                                                            +
                                                                                                                                            640  );
                                                                                                                                            +
                                                                                                                                            641 
                                                                                                                                            +
                                                                                                                                            642  params_last[idx] = params;
                                                                                                                                            +
                                                                                                                                            643 
                                                                                                                                            +
                                                                                                                                            644  }
                                                                                                                                            +
                                                                                                                                            645 
                                                                                                                                            +
                                                                                                                                            646  return likelihood_(
                                                                                                                                            +
                                                                                                                                            647  &stats_target[i],
                                                                                                                                            +
                                                                                                                                            648  params,
                                                                                                                                            +
                                                                                                                                            649  normalizing_constants[idx],
                                                                                                                                            +
                                                                                                                                            650  nterms(),
                                                                                                                                            +
                                                                                                                                            651  as_log
                                                                                                                                            +
                                                                                                                                            652  );
                                                                                                                                            +
                                                                                                                                            653 
                                                                                                                                            +
                                                                                                                                            654 }
                                                                                                                                            +
                                                                                                                                            655 
                                                                                                                                            +
                                                                                                                                            656 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            658  const std::vector<double> & params,
                                                                                                                                            +
                                                                                                                                            659  const Array_Type & Array_,
                                                                                                                                            +
                                                                                                                                            660  int i,
                                                                                                                                            +
                                                                                                                                            661  bool as_log,
                                                                                                                                            +
                                                                                                                                            662  bool no_update_normconst
                                                                                                                                            +
                                                                                                                                            663 ) {
                                                                                                                                            +
                                                                                                                                            664 
                                                                                                                                            +
                                                                                                                                            665  // Key of the support set to use
                                                                                                                                            +
                                                                                                                                            666  int loc;
                                                                                                                                            +
                                                                                                                                            667 
                                                                                                                                            +
                                                                                                                                            668  if (i < 0)
                                                                                                                                            +
                                                                                                                                            669  {
                                                                                                                                            670 
                                                                                                                                            -
                                                                                                                                            671 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            673  const std::vector<double> & params,
                                                                                                                                            -
                                                                                                                                            674  const Array_Type & Array_,
                                                                                                                                            -
                                                                                                                                            675  int i,
                                                                                                                                            -
                                                                                                                                            676  bool as_log,
                                                                                                                                            -
                                                                                                                                            677  bool no_update_normconst
                                                                                                                                            -
                                                                                                                                            678 ) {
                                                                                                                                            -
                                                                                                                                            679 
                                                                                                                                            -
                                                                                                                                            680  // Key of the support set to use
                                                                                                                                            -
                                                                                                                                            681  int loc;
                                                                                                                                            -
                                                                                                                                            682 
                                                                                                                                            -
                                                                                                                                            683  if (i < 0)
                                                                                                                                            -
                                                                                                                                            684  {
                                                                                                                                            -
                                                                                                                                            685 
                                                                                                                                            -
                                                                                                                                            686  std::vector< double > key = counters->gen_hash(Array_);
                                                                                                                                            -
                                                                                                                                            687  MapVec_type< double, size_t >::const_iterator locator = keys2support.find(key);
                                                                                                                                            -
                                                                                                                                            688  if (locator == keys2support.end())
                                                                                                                                            -
                                                                                                                                            689  throw std::range_error(
                                                                                                                                            -
                                                                                                                                            690  "This type of array has not been included in the model."
                                                                                                                                            -
                                                                                                                                            691  );
                                                                                                                                            +
                                                                                                                                            671  std::vector< double > key = counters->gen_hash(Array_);
                                                                                                                                            +
                                                                                                                                            672  MapVec_type< double, size_t >::const_iterator locator = keys2support.find(key);
                                                                                                                                            +
                                                                                                                                            673  if (locator == keys2support.end())
                                                                                                                                            +
                                                                                                                                            674  throw std::range_error(
                                                                                                                                            +
                                                                                                                                            675  "This type of array has not been included in the model."
                                                                                                                                            +
                                                                                                                                            676  );
                                                                                                                                            +
                                                                                                                                            677 
                                                                                                                                            +
                                                                                                                                            678  loc = locator->second;
                                                                                                                                            +
                                                                                                                                            679 
                                                                                                                                            +
                                                                                                                                            680  }
                                                                                                                                            +
                                                                                                                                            681  else
                                                                                                                                            +
                                                                                                                                            682  {
                                                                                                                                            +
                                                                                                                                            683 
                                                                                                                                            +
                                                                                                                                            684  if (static_cast<size_t>(i) >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            685  throw std::range_error(
                                                                                                                                            +
                                                                                                                                            686  "This type of array has not been included in the model."
                                                                                                                                            +
                                                                                                                                            687  );
                                                                                                                                            +
                                                                                                                                            688 
                                                                                                                                            +
                                                                                                                                            689  loc = arrays2support[i];
                                                                                                                                            +
                                                                                                                                            690 
                                                                                                                                            +
                                                                                                                                            691  }
                                                                                                                                            692 
                                                                                                                                            -
                                                                                                                                            693  loc = locator->second;
                                                                                                                                            -
                                                                                                                                            694 
                                                                                                                                            -
                                                                                                                                            695  }
                                                                                                                                            -
                                                                                                                                            696  else
                                                                                                                                            -
                                                                                                                                            697  {
                                                                                                                                            -
                                                                                                                                            698 
                                                                                                                                            -
                                                                                                                                            699  if (static_cast<size_t>(i) >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            700  throw std::range_error(
                                                                                                                                            -
                                                                                                                                            701  "This type of array has not been included in the model."
                                                                                                                                            -
                                                                                                                                            702  );
                                                                                                                                            +
                                                                                                                                            693  // Checking if this actually has a change of happening
                                                                                                                                            +
                                                                                                                                            694  if (this->stats_support[loc].size() == 0u)
                                                                                                                                            +
                                                                                                                                            695  return as_log ? -std::numeric_limits<double>::infinity() : 0.0;
                                                                                                                                            +
                                                                                                                                            696 
                                                                                                                                            +
                                                                                                                                            697  // Counting stats_target
                                                                                                                                            + +
                                                                                                                                            699 
                                                                                                                                            +
                                                                                                                                            700  tmpstats.set_counters(this->counters);
                                                                                                                                            +
                                                                                                                                            701 
                                                                                                                                            +
                                                                                                                                            702  std::vector< double > target_ = tmpstats.count_all();
                                                                                                                                            703 
                                                                                                                                            -
                                                                                                                                            704  loc = arrays2support[i];
                                                                                                                                            -
                                                                                                                                            705 
                                                                                                                                            -
                                                                                                                                            706  }
                                                                                                                                            -
                                                                                                                                            707 
                                                                                                                                            -
                                                                                                                                            708  // Checking if this actually has a change of happening
                                                                                                                                            -
                                                                                                                                            709  if (this->stats_support[loc].size() == 0u)
                                                                                                                                            -
                                                                                                                                            710  return as_log ? -std::numeric_limits<double>::infinity() : 0.0;
                                                                                                                                            -
                                                                                                                                            711 
                                                                                                                                            -
                                                                                                                                            712  // Counting stats_target
                                                                                                                                            - -
                                                                                                                                            714 
                                                                                                                                            -
                                                                                                                                            715  tmpstats.set_counters(this->counters);
                                                                                                                                            -
                                                                                                                                            716 
                                                                                                                                            -
                                                                                                                                            717  std::vector< double > target_ = tmpstats.count_all();
                                                                                                                                            -
                                                                                                                                            718 
                                                                                                                                            -
                                                                                                                                            719  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            720  target_ = transform_model_fun(&target_[0u], target_.size());
                                                                                                                                            -
                                                                                                                                            721 
                                                                                                                                            -
                                                                                                                                            722  // Checking if we have updated the normalizing constant or not
                                                                                                                                            -
                                                                                                                                            723  if (!no_update_normconst && (!first_calc_done[loc] || !vec_equal_approx(params, params_last[loc])) )
                                                                                                                                            -
                                                                                                                                            724  {
                                                                                                                                            -
                                                                                                                                            725 
                                                                                                                                            -
                                                                                                                                            726  first_calc_done[loc] = true;
                                                                                                                                            -
                                                                                                                                            727 
                                                                                                                                            -
                                                                                                                                            728  size_t k = params.size() + 1u;
                                                                                                                                            -
                                                                                                                                            729  size_t n = stats_support[loc].size() / k;
                                                                                                                                            -
                                                                                                                                            730 
                                                                                                                                            -
                                                                                                                                            731  normalizing_constants[loc] = update_normalizing_constant(
                                                                                                                                            -
                                                                                                                                            732  params, &stats_support[loc][0u], k, n
                                                                                                                                            -
                                                                                                                                            733  );
                                                                                                                                            -
                                                                                                                                            734 
                                                                                                                                            -
                                                                                                                                            735  params_last[loc] = params;
                                                                                                                                            -
                                                                                                                                            736 
                                                                                                                                            -
                                                                                                                                            737  }
                                                                                                                                            -
                                                                                                                                            738 
                                                                                                                                            -
                                                                                                                                            739  // Checking if passes the rules
                                                                                                                                            -
                                                                                                                                            740  if (!support_fun.eval_rules_dyn(target_, 0u, 0u))
                                                                                                                                            -
                                                                                                                                            741  return as_log ? -std::numeric_limits<double>::infinity() : 0.0;
                                                                                                                                            -
                                                                                                                                            742 
                                                                                                                                            -
                                                                                                                                            743  return likelihood_(
                                                                                                                                            -
                                                                                                                                            744  &target_[0u],
                                                                                                                                            -
                                                                                                                                            745  params,
                                                                                                                                            -
                                                                                                                                            746  normalizing_constants[loc],
                                                                                                                                            -
                                                                                                                                            747  nterms(),
                                                                                                                                            -
                                                                                                                                            748  as_log
                                                                                                                                            -
                                                                                                                                            749  );
                                                                                                                                            -
                                                                                                                                            750 
                                                                                                                                            -
                                                                                                                                            751 }
                                                                                                                                            +
                                                                                                                                            704  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            705  target_ = transform_model_fun(&target_[0u], target_.size());
                                                                                                                                            +
                                                                                                                                            706 
                                                                                                                                            +
                                                                                                                                            707  // Checking if we have updated the normalizing constant or not
                                                                                                                                            +
                                                                                                                                            708  if (!no_update_normconst && (!first_calc_done[loc] || !vec_equal_approx(params, params_last[loc])) )
                                                                                                                                            +
                                                                                                                                            709  {
                                                                                                                                            +
                                                                                                                                            710 
                                                                                                                                            +
                                                                                                                                            711  first_calc_done[loc] = true;
                                                                                                                                            +
                                                                                                                                            712 
                                                                                                                                            +
                                                                                                                                            713  size_t k = params.size() + 1u;
                                                                                                                                            +
                                                                                                                                            714  size_t n = stats_support[loc].size() / k;
                                                                                                                                            +
                                                                                                                                            715 
                                                                                                                                            +
                                                                                                                                            716  normalizing_constants[loc] = update_normalizing_constant(
                                                                                                                                            +
                                                                                                                                            717  params, &stats_support[loc][0u], k, n
                                                                                                                                            +
                                                                                                                                            718  );
                                                                                                                                            +
                                                                                                                                            719 
                                                                                                                                            +
                                                                                                                                            720  params_last[loc] = params;
                                                                                                                                            +
                                                                                                                                            721 
                                                                                                                                            +
                                                                                                                                            722  }
                                                                                                                                            +
                                                                                                                                            723 
                                                                                                                                            +
                                                                                                                                            724  // Checking if passes the rules
                                                                                                                                            +
                                                                                                                                            725  if (!support_fun.eval_rules_dyn(target_, 0u, 0u))
                                                                                                                                            +
                                                                                                                                            726  return as_log ? -std::numeric_limits<double>::infinity() : 0.0;
                                                                                                                                            +
                                                                                                                                            727 
                                                                                                                                            +
                                                                                                                                            728  return likelihood_(
                                                                                                                                            +
                                                                                                                                            729  &target_[0u],
                                                                                                                                            +
                                                                                                                                            730  params,
                                                                                                                                            +
                                                                                                                                            731  normalizing_constants[loc],
                                                                                                                                            +
                                                                                                                                            732  nterms(),
                                                                                                                                            +
                                                                                                                                            733  as_log
                                                                                                                                            +
                                                                                                                                            734  );
                                                                                                                                            +
                                                                                                                                            735 
                                                                                                                                            +
                                                                                                                                            736 }
                                                                                                                                            +
                                                                                                                                            737 
                                                                                                                                            +
                                                                                                                                            738 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            740  const std::vector<double> & params,
                                                                                                                                            +
                                                                                                                                            741  const std::vector<double> & target_,
                                                                                                                                            +
                                                                                                                                            742  const size_t & i,
                                                                                                                                            +
                                                                                                                                            743  bool as_log,
                                                                                                                                            +
                                                                                                                                            744  bool no_update_normconst
                                                                                                                                            +
                                                                                                                                            745 ) {
                                                                                                                                            +
                                                                                                                                            746 
                                                                                                                                            +
                                                                                                                                            747  // Checking if the index exists
                                                                                                                                            +
                                                                                                                                            748  if (i >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            749  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            750 
                                                                                                                                            +
                                                                                                                                            751  size_t loc = arrays2support[i];
                                                                                                                                            752 
                                                                                                                                            -
                                                                                                                                            753 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            755  const std::vector<double> & params,
                                                                                                                                            -
                                                                                                                                            756  const std::vector<double> & target_,
                                                                                                                                            -
                                                                                                                                            757  const size_t & i,
                                                                                                                                            -
                                                                                                                                            758  bool as_log,
                                                                                                                                            -
                                                                                                                                            759  bool no_update_normconst
                                                                                                                                            -
                                                                                                                                            760 ) {
                                                                                                                                            -
                                                                                                                                            761 
                                                                                                                                            -
                                                                                                                                            762  // Checking if the index exists
                                                                                                                                            -
                                                                                                                                            763  if (i >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            764  throw std::range_error("The requested support is out of range");
                                                                                                                                            -
                                                                                                                                            765 
                                                                                                                                            -
                                                                                                                                            766  size_t loc = arrays2support[i];
                                                                                                                                            -
                                                                                                                                            767 
                                                                                                                                            -
                                                                                                                                            768  // Checking if passes the rules
                                                                                                                                            -
                                                                                                                                            769  if (!support_fun.eval_rules_dyn(target_, 0u, 0u))
                                                                                                                                            -
                                                                                                                                            770  {
                                                                                                                                            -
                                                                                                                                            771 
                                                                                                                                            -
                                                                                                                                            772  // Concatenating the elements of target_ into aa single string
                                                                                                                                            -
                                                                                                                                            773  std::string target_str = "";
                                                                                                                                            -
                                                                                                                                            774  for (size_t i = 0u; i < target_.size(); ++i)
                                                                                                                                            -
                                                                                                                                            775  target_str += std::to_string(target_[i]) + " ";
                                                                                                                                            -
                                                                                                                                            776 
                                                                                                                                            -
                                                                                                                                            777  throw std::range_error(
                                                                                                                                            -
                                                                                                                                            778  "The array is not in the support set. The array's statistics are: " +
                                                                                                                                            -
                                                                                                                                            779  target_str +
                                                                                                                                            -
                                                                                                                                            780  std::string(".")
                                                                                                                                            -
                                                                                                                                            781  );
                                                                                                                                            -
                                                                                                                                            782  }
                                                                                                                                            -
                                                                                                                                            783 
                                                                                                                                            -
                                                                                                                                            784 
                                                                                                                                            -
                                                                                                                                            785  // Checking if this actually has a change of happening
                                                                                                                                            -
                                                                                                                                            786  if (this->stats_support[loc].size() == 0u)
                                                                                                                                            -
                                                                                                                                            787  {
                                                                                                                                            -
                                                                                                                                            788  throw std::logic_error("The support set for this array is empty.");
                                                                                                                                            -
                                                                                                                                            789  }
                                                                                                                                            -
                                                                                                                                            790 
                                                                                                                                            -
                                                                                                                                            791  // Checking if we have updated the normalizing constant or not
                                                                                                                                            -
                                                                                                                                            792  if (!no_update_normconst && (!first_calc_done[loc] || !vec_equal_approx(params, params_last[loc])) ) {
                                                                                                                                            -
                                                                                                                                            793 
                                                                                                                                            -
                                                                                                                                            794  first_calc_done[loc] = true;
                                                                                                                                            -
                                                                                                                                            795 
                                                                                                                                            -
                                                                                                                                            796  size_t k = params.size() + 1u;
                                                                                                                                            -
                                                                                                                                            797  size_t n = stats_support[loc].size() / k;
                                                                                                                                            -
                                                                                                                                            798 
                                                                                                                                            -
                                                                                                                                            799  normalizing_constants[loc] = update_normalizing_constant(
                                                                                                                                            -
                                                                                                                                            800  params, &stats_support[loc][0u], k, n
                                                                                                                                            -
                                                                                                                                            801  );
                                                                                                                                            -
                                                                                                                                            802 
                                                                                                                                            -
                                                                                                                                            803  params_last[loc] = params;
                                                                                                                                            -
                                                                                                                                            804 
                                                                                                                                            -
                                                                                                                                            805  }
                                                                                                                                            -
                                                                                                                                            806 
                                                                                                                                            -
                                                                                                                                            807  return likelihood_(
                                                                                                                                            -
                                                                                                                                            808  &target_[0u],
                                                                                                                                            -
                                                                                                                                            809  params,
                                                                                                                                            -
                                                                                                                                            810  normalizing_constants[loc],
                                                                                                                                            -
                                                                                                                                            811  nterms(),
                                                                                                                                            -
                                                                                                                                            812  as_log
                                                                                                                                            -
                                                                                                                                            813  );
                                                                                                                                            -
                                                                                                                                            814 
                                                                                                                                            -
                                                                                                                                            815 }
                                                                                                                                            +
                                                                                                                                            753  // Checking if passes the rules
                                                                                                                                            +
                                                                                                                                            754  if (!support_fun.eval_rules_dyn(target_, 0u, 0u))
                                                                                                                                            +
                                                                                                                                            755  {
                                                                                                                                            +
                                                                                                                                            756 
                                                                                                                                            +
                                                                                                                                            757  // Concatenating the elements of target_ into aa single string
                                                                                                                                            +
                                                                                                                                            758  std::string target_str = "";
                                                                                                                                            +
                                                                                                                                            759  for (size_t i = 0u; i < target_.size(); ++i)
                                                                                                                                            +
                                                                                                                                            760  target_str += std::to_string(target_[i]) + " ";
                                                                                                                                            +
                                                                                                                                            761 
                                                                                                                                            +
                                                                                                                                            762  throw std::range_error(
                                                                                                                                            +
                                                                                                                                            763  "The array is not in the support set. The array's statistics are: " +
                                                                                                                                            +
                                                                                                                                            764  target_str +
                                                                                                                                            +
                                                                                                                                            765  std::string(".")
                                                                                                                                            +
                                                                                                                                            766  );
                                                                                                                                            +
                                                                                                                                            767  }
                                                                                                                                            +
                                                                                                                                            768 
                                                                                                                                            +
                                                                                                                                            769 
                                                                                                                                            +
                                                                                                                                            770  // Checking if this actually has a change of happening
                                                                                                                                            +
                                                                                                                                            771  if (this->stats_support[loc].size() == 0u)
                                                                                                                                            +
                                                                                                                                            772  {
                                                                                                                                            +
                                                                                                                                            773  throw std::logic_error("The support set for this array is empty.");
                                                                                                                                            +
                                                                                                                                            774  }
                                                                                                                                            +
                                                                                                                                            775 
                                                                                                                                            +
                                                                                                                                            776  // Checking if we have updated the normalizing constant or not
                                                                                                                                            +
                                                                                                                                            777  if (!no_update_normconst && (!first_calc_done[loc] || !vec_equal_approx(params, params_last[loc])) ) {
                                                                                                                                            +
                                                                                                                                            778 
                                                                                                                                            +
                                                                                                                                            779  first_calc_done[loc] = true;
                                                                                                                                            +
                                                                                                                                            780 
                                                                                                                                            +
                                                                                                                                            781  size_t k = params.size() + 1u;
                                                                                                                                            +
                                                                                                                                            782  size_t n = stats_support[loc].size() / k;
                                                                                                                                            +
                                                                                                                                            783 
                                                                                                                                            +
                                                                                                                                            784  normalizing_constants[loc] = update_normalizing_constant(
                                                                                                                                            +
                                                                                                                                            785  params, &stats_support[loc][0u], k, n
                                                                                                                                            +
                                                                                                                                            786  );
                                                                                                                                            +
                                                                                                                                            787 
                                                                                                                                            +
                                                                                                                                            788  params_last[loc] = params;
                                                                                                                                            +
                                                                                                                                            789 
                                                                                                                                            +
                                                                                                                                            790  }
                                                                                                                                            +
                                                                                                                                            791 
                                                                                                                                            +
                                                                                                                                            792  return likelihood_(
                                                                                                                                            +
                                                                                                                                            793  &target_[0u],
                                                                                                                                            +
                                                                                                                                            794  params,
                                                                                                                                            +
                                                                                                                                            795  normalizing_constants[loc],
                                                                                                                                            +
                                                                                                                                            796  nterms(),
                                                                                                                                            +
                                                                                                                                            797  as_log
                                                                                                                                            +
                                                                                                                                            798  );
                                                                                                                                            +
                                                                                                                                            799 
                                                                                                                                            +
                                                                                                                                            800 }
                                                                                                                                            +
                                                                                                                                            801 
                                                                                                                                            +
                                                                                                                                            802 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            804  const std::vector<double> & params,
                                                                                                                                            +
                                                                                                                                            805  const double * target_,
                                                                                                                                            +
                                                                                                                                            806  const size_t & i,
                                                                                                                                            +
                                                                                                                                            807  bool as_log,
                                                                                                                                            +
                                                                                                                                            808  bool no_update_normconst
                                                                                                                                            +
                                                                                                                                            809 ) {
                                                                                                                                            +
                                                                                                                                            810 
                                                                                                                                            +
                                                                                                                                            811  // Checking if the index exists
                                                                                                                                            +
                                                                                                                                            812  if (i >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            813  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            814 
                                                                                                                                            +
                                                                                                                                            815  size_t loc = arrays2support[i];
                                                                                                                                            816 
                                                                                                                                            -
                                                                                                                                            817 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            819  const std::vector<double> & params,
                                                                                                                                            -
                                                                                                                                            820  const double * target_,
                                                                                                                                            -
                                                                                                                                            821  const size_t & i,
                                                                                                                                            -
                                                                                                                                            822  bool as_log,
                                                                                                                                            -
                                                                                                                                            823  bool no_update_normconst
                                                                                                                                            -
                                                                                                                                            824 ) {
                                                                                                                                            -
                                                                                                                                            825 
                                                                                                                                            -
                                                                                                                                            826  // Checking if the index exists
                                                                                                                                            -
                                                                                                                                            827  if (i >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            828  throw std::range_error("The requested support is out of range");
                                                                                                                                            -
                                                                                                                                            829 
                                                                                                                                            -
                                                                                                                                            830  size_t loc = arrays2support[i];
                                                                                                                                            -
                                                                                                                                            831 
                                                                                                                                            -
                                                                                                                                            832  // Checking if passes the rules
                                                                                                                                            -
                                                                                                                                            833  if (support_fun.get_rules_dyn()->size() > 0u)
                                                                                                                                            -
                                                                                                                                            834  {
                                                                                                                                            -
                                                                                                                                            835 
                                                                                                                                            -
                                                                                                                                            836  std::vector< double > tmp_target;
                                                                                                                                            -
                                                                                                                                            837  tmp_target.reserve(nterms());
                                                                                                                                            -
                                                                                                                                            838  for (size_t t = 0u; t < nterms(); ++t)
                                                                                                                                            -
                                                                                                                                            839  tmp_target.push_back(*(target_ + t));
                                                                                                                                            -
                                                                                                                                            840 
                                                                                                                                            -
                                                                                                                                            841  if (!support_fun.eval_rules_dyn(tmp_target, 0u, 0u))
                                                                                                                                            -
                                                                                                                                            842  {
                                                                                                                                            -
                                                                                                                                            843  // Concatenating the elements of target_ into aa single string
                                                                                                                                            -
                                                                                                                                            844  std::string target_str = "";
                                                                                                                                            -
                                                                                                                                            845  for (size_t i = 0u; i < nterms(); ++i)
                                                                                                                                            -
                                                                                                                                            846  target_str += std::to_string((*target_ + i)) + " ";
                                                                                                                                            -
                                                                                                                                            847 
                                                                                                                                            -
                                                                                                                                            848  throw std::range_error(
                                                                                                                                            -
                                                                                                                                            849  "The array is not in the support set. The array's statistics are: " + target_str + std::string(".")
                                                                                                                                            -
                                                                                                                                            850  );
                                                                                                                                            -
                                                                                                                                            851  }
                                                                                                                                            -
                                                                                                                                            852 
                                                                                                                                            -
                                                                                                                                            853  }
                                                                                                                                            -
                                                                                                                                            854 
                                                                                                                                            -
                                                                                                                                            855  // Checking if this actually has a change of happening
                                                                                                                                            -
                                                                                                                                            856  if (this->stats_support[loc].size() == 0u)
                                                                                                                                            -
                                                                                                                                            857  {
                                                                                                                                            -
                                                                                                                                            858  throw std::logic_error("The support set for this array is empty.");
                                                                                                                                            -
                                                                                                                                            859  }
                                                                                                                                            -
                                                                                                                                            860 
                                                                                                                                            -
                                                                                                                                            861  // Checking if we have updated the normalizing constant or not
                                                                                                                                            -
                                                                                                                                            862  if (!no_update_normconst && (!first_calc_done[loc] || !vec_equal_approx(params, params_last[loc]) )) {
                                                                                                                                            -
                                                                                                                                            863 
                                                                                                                                            -
                                                                                                                                            864  first_calc_done[loc] = true;
                                                                                                                                            -
                                                                                                                                            865 
                                                                                                                                            -
                                                                                                                                            866  size_t k = params.size() + 1u;
                                                                                                                                            -
                                                                                                                                            867  size_t n = stats_support[loc].size() / k;
                                                                                                                                            -
                                                                                                                                            868 
                                                                                                                                            -
                                                                                                                                            869  normalizing_constants[loc] = update_normalizing_constant(
                                                                                                                                            -
                                                                                                                                            870  params, &stats_support[loc][0u], k, n
                                                                                                                                            -
                                                                                                                                            871  );
                                                                                                                                            -
                                                                                                                                            872 
                                                                                                                                            -
                                                                                                                                            873  params_last[loc] = params;
                                                                                                                                            -
                                                                                                                                            874 
                                                                                                                                            -
                                                                                                                                            875  }
                                                                                                                                            -
                                                                                                                                            876 
                                                                                                                                            -
                                                                                                                                            877  return likelihood_(
                                                                                                                                            -
                                                                                                                                            878  target_,
                                                                                                                                            -
                                                                                                                                            879  params,
                                                                                                                                            -
                                                                                                                                            880  normalizing_constants[loc],
                                                                                                                                            -
                                                                                                                                            881  nterms(),
                                                                                                                                            -
                                                                                                                                            882  as_log
                                                                                                                                            -
                                                                                                                                            883  );
                                                                                                                                            -
                                                                                                                                            884 
                                                                                                                                            -
                                                                                                                                            885 }
                                                                                                                                            -
                                                                                                                                            886 
                                                                                                                                            -
                                                                                                                                            887 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            889  const std::vector<double> & params,
                                                                                                                                            -
                                                                                                                                            890  bool as_log,
                                                                                                                                            - -
                                                                                                                                            892  bool no_update_normconst
                                                                                                                                            -
                                                                                                                                            893 ) {
                                                                                                                                            -
                                                                                                                                            894 
                                                                                                                                            -
                                                                                                                                            895  size_t params_last_size = params_last.size();
                                                                                                                                            -
                                                                                                                                            896 
                                                                                                                                            -
                                                                                                                                            897  if (!no_update_normconst)
                                                                                                                                            -
                                                                                                                                            898  {
                                                                                                                                            -
                                                                                                                                            899  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            -
                                                                                                                                            900  #pragma omp parallel for num_threads(ncores) \
                                                                                                                                            -
                                                                                                                                            901  shared(normalizing_constants, params_last, first_calc_done, stats_support) \
                                                                                                                                            -
                                                                                                                                            902  firstprivate(params)
                                                                                                                                            -
                                                                                                                                            903  #endif
                                                                                                                                            -
                                                                                                                                            904  for (size_t i = 0u; i < params_last_size; ++i)
                                                                                                                                            -
                                                                                                                                            905  {
                                                                                                                                            +
                                                                                                                                            817  // Checking if passes the rules
                                                                                                                                            +
                                                                                                                                            818  if (support_fun.get_rules_dyn()->size() > 0u)
                                                                                                                                            +
                                                                                                                                            819  {
                                                                                                                                            +
                                                                                                                                            820 
                                                                                                                                            +
                                                                                                                                            821  std::vector< double > tmp_target;
                                                                                                                                            +
                                                                                                                                            822  tmp_target.reserve(nterms());
                                                                                                                                            +
                                                                                                                                            823  for (size_t t = 0u; t < nterms(); ++t)
                                                                                                                                            +
                                                                                                                                            824  tmp_target.push_back(*(target_ + t));
                                                                                                                                            +
                                                                                                                                            825 
                                                                                                                                            +
                                                                                                                                            826  if (!support_fun.eval_rules_dyn(tmp_target, 0u, 0u))
                                                                                                                                            +
                                                                                                                                            827  {
                                                                                                                                            +
                                                                                                                                            828  // Concatenating the elements of target_ into aa single string
                                                                                                                                            +
                                                                                                                                            829  std::string target_str = "";
                                                                                                                                            +
                                                                                                                                            830  for (size_t i = 0u; i < nterms(); ++i)
                                                                                                                                            +
                                                                                                                                            831  target_str += std::to_string((*target_ + i)) + " ";
                                                                                                                                            +
                                                                                                                                            832 
                                                                                                                                            +
                                                                                                                                            833  throw std::range_error(
                                                                                                                                            +
                                                                                                                                            834  "The array is not in the support set. The array's statistics are: " + target_str + std::string(".")
                                                                                                                                            +
                                                                                                                                            835  );
                                                                                                                                            +
                                                                                                                                            836  }
                                                                                                                                            +
                                                                                                                                            837 
                                                                                                                                            +
                                                                                                                                            838  }
                                                                                                                                            +
                                                                                                                                            839 
                                                                                                                                            +
                                                                                                                                            840  // Checking if this actually has a change of happening
                                                                                                                                            +
                                                                                                                                            841  if (this->stats_support[loc].size() == 0u)
                                                                                                                                            +
                                                                                                                                            842  {
                                                                                                                                            +
                                                                                                                                            843  throw std::logic_error("The support set for this array is empty.");
                                                                                                                                            +
                                                                                                                                            844  }
                                                                                                                                            +
                                                                                                                                            845 
                                                                                                                                            +
                                                                                                                                            846  // Checking if we have updated the normalizing constant or not
                                                                                                                                            +
                                                                                                                                            847  if (!no_update_normconst && (!first_calc_done[loc] || !vec_equal_approx(params, params_last[loc]) )) {
                                                                                                                                            +
                                                                                                                                            848 
                                                                                                                                            +
                                                                                                                                            849  first_calc_done[loc] = true;
                                                                                                                                            +
                                                                                                                                            850 
                                                                                                                                            +
                                                                                                                                            851  size_t k = params.size() + 1u;
                                                                                                                                            +
                                                                                                                                            852  size_t n = stats_support[loc].size() / k;
                                                                                                                                            +
                                                                                                                                            853 
                                                                                                                                            +
                                                                                                                                            854  normalizing_constants[loc] = update_normalizing_constant(
                                                                                                                                            +
                                                                                                                                            855  params, &stats_support[loc][0u], k, n
                                                                                                                                            +
                                                                                                                                            856  );
                                                                                                                                            +
                                                                                                                                            857 
                                                                                                                                            +
                                                                                                                                            858  params_last[loc] = params;
                                                                                                                                            +
                                                                                                                                            859 
                                                                                                                                            +
                                                                                                                                            860  }
                                                                                                                                            +
                                                                                                                                            861 
                                                                                                                                            +
                                                                                                                                            862  return likelihood_(
                                                                                                                                            +
                                                                                                                                            863  target_,
                                                                                                                                            +
                                                                                                                                            864  params,
                                                                                                                                            +
                                                                                                                                            865  normalizing_constants[loc],
                                                                                                                                            +
                                                                                                                                            866  nterms(),
                                                                                                                                            +
                                                                                                                                            867  as_log
                                                                                                                                            +
                                                                                                                                            868  );
                                                                                                                                            +
                                                                                                                                            869 
                                                                                                                                            +
                                                                                                                                            870 }
                                                                                                                                            +
                                                                                                                                            871 
                                                                                                                                            +
                                                                                                                                            872 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            874  const std::vector<double> & params,
                                                                                                                                            +
                                                                                                                                            875  bool as_log,
                                                                                                                                            + +
                                                                                                                                            877  bool no_update_normconst
                                                                                                                                            +
                                                                                                                                            878 ) {
                                                                                                                                            +
                                                                                                                                            879 
                                                                                                                                            +
                                                                                                                                            880  size_t params_last_size = params_last.size();
                                                                                                                                            +
                                                                                                                                            881 
                                                                                                                                            +
                                                                                                                                            882  if (!no_update_normconst)
                                                                                                                                            +
                                                                                                                                            883  {
                                                                                                                                            +
                                                                                                                                            884  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            885  #pragma omp parallel for num_threads(ncores) \
                                                                                                                                            +
                                                                                                                                            886  shared(normalizing_constants, params_last, first_calc_done, stats_support) \
                                                                                                                                            +
                                                                                                                                            887  firstprivate(params)
                                                                                                                                            +
                                                                                                                                            888  #endif
                                                                                                                                            +
                                                                                                                                            889  for (size_t i = 0u; i < params_last_size; ++i)
                                                                                                                                            +
                                                                                                                                            890  {
                                                                                                                                            +
                                                                                                                                            891 
                                                                                                                                            +
                                                                                                                                            892  if (!first_calc_done[i] || !vec_equal_approx(params, params_last[i]) )
                                                                                                                                            +
                                                                                                                                            893  {
                                                                                                                                            +
                                                                                                                                            894 
                                                                                                                                            +
                                                                                                                                            895  size_t k = params.size() + 1u;
                                                                                                                                            +
                                                                                                                                            896  size_t n = stats_support[i].size() / k;
                                                                                                                                            +
                                                                                                                                            897 
                                                                                                                                            +
                                                                                                                                            898  first_calc_done[i] = true;
                                                                                                                                            +
                                                                                                                                            899  normalizing_constants[i] = update_normalizing_constant(
                                                                                                                                            +
                                                                                                                                            900  params, &stats_support[i][0u], k, n
                                                                                                                                            +
                                                                                                                                            901  );
                                                                                                                                            +
                                                                                                                                            902 
                                                                                                                                            +
                                                                                                                                            903  params_last[i] = params;
                                                                                                                                            +
                                                                                                                                            904 
                                                                                                                                            +
                                                                                                                                            905  }
                                                                                                                                            906 
                                                                                                                                            -
                                                                                                                                            907  if (!first_calc_done[i] || !vec_equal_approx(params, params_last[i]) )
                                                                                                                                            -
                                                                                                                                            908  {
                                                                                                                                            -
                                                                                                                                            909 
                                                                                                                                            -
                                                                                                                                            910  size_t k = params.size() + 1u;
                                                                                                                                            -
                                                                                                                                            911  size_t n = stats_support[i].size() / k;
                                                                                                                                            -
                                                                                                                                            912 
                                                                                                                                            -
                                                                                                                                            913  first_calc_done[i] = true;
                                                                                                                                            -
                                                                                                                                            914  normalizing_constants[i] = update_normalizing_constant(
                                                                                                                                            -
                                                                                                                                            915  params, &stats_support[i][0u], k, n
                                                                                                                                            -
                                                                                                                                            916  );
                                                                                                                                            -
                                                                                                                                            917 
                                                                                                                                            -
                                                                                                                                            918  params_last[i] = params;
                                                                                                                                            -
                                                                                                                                            919 
                                                                                                                                            -
                                                                                                                                            920  }
                                                                                                                                            -
                                                                                                                                            921 
                                                                                                                                            -
                                                                                                                                            922  }
                                                                                                                                            -
                                                                                                                                            923  }
                                                                                                                                            -
                                                                                                                                            924 
                                                                                                                                            -
                                                                                                                                            925  double res = 0.0;
                                                                                                                                            -
                                                                                                                                            926  if (as_log)
                                                                                                                                            -
                                                                                                                                            927  {
                                                                                                                                            -
                                                                                                                                            928 
                                                                                                                                            -
                                                                                                                                            929  for (size_t i = 0; i < stats_target.size(); ++i)
                                                                                                                                            -
                                                                                                                                            930  res += vec_inner_prod(
                                                                                                                                            -
                                                                                                                                            931  &stats_target[i][0u],
                                                                                                                                            -
                                                                                                                                            932  &params[0u],
                                                                                                                                            -
                                                                                                                                            933  params.size()
                                                                                                                                            -
                                                                                                                                            934  ) BARRY_SAFE_EXP;
                                                                                                                                            -
                                                                                                                                            935 
                                                                                                                                            -
                                                                                                                                            936  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            -
                                                                                                                                            937  #pragma omp simd reduction(-:res)
                                                                                                                                            -
                                                                                                                                            938  #endif
                                                                                                                                            -
                                                                                                                                            939  for (size_t i = 0u; i < params_last_size; ++i)
                                                                                                                                            -
                                                                                                                                            940  res -= (std::log(normalizing_constants[i]) * this->stats_support_n_arrays[i]);
                                                                                                                                            -
                                                                                                                                            941 
                                                                                                                                            -
                                                                                                                                            942  } else {
                                                                                                                                            -
                                                                                                                                            943 
                                                                                                                                            -
                                                                                                                                            944  res = 1.0;
                                                                                                                                            -
                                                                                                                                            945  size_t stats_target_size = stats_target.size();
                                                                                                                                            -
                                                                                                                                            946  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            -
                                                                                                                                            947  #pragma omp simd reduction(*:res)
                                                                                                                                            -
                                                                                                                                            948  #endif
                                                                                                                                            -
                                                                                                                                            949  for (size_t i = 0; i < stats_target_size; ++i)
                                                                                                                                            -
                                                                                                                                            950  res *= std::exp(
                                                                                                                                            - -
                                                                                                                                            952  &stats_target[i][0u],
                                                                                                                                            -
                                                                                                                                            953  &params[0u],
                                                                                                                                            -
                                                                                                                                            954  params.size()
                                                                                                                                            -
                                                                                                                                            955  ) BARRY_SAFE_EXP) /
                                                                                                                                            -
                                                                                                                                            956  normalizing_constants[arrays2support[i]];
                                                                                                                                            -
                                                                                                                                            957 
                                                                                                                                            -
                                                                                                                                            958  }
                                                                                                                                            -
                                                                                                                                            959 
                                                                                                                                            -
                                                                                                                                            960  return res;
                                                                                                                                            -
                                                                                                                                            961 
                                                                                                                                            -
                                                                                                                                            962 }
                                                                                                                                            -
                                                                                                                                            963 
                                                                                                                                            -
                                                                                                                                            964 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            -
                                                                                                                                            965 inline std::vector< double > &
                                                                                                                                            - -
                                                                                                                                            967 
                                                                                                                                            -
                                                                                                                                            968  return normalizing_constants;
                                                                                                                                            -
                                                                                                                                            969 
                                                                                                                                            -
                                                                                                                                            970 }
                                                                                                                                            -
                                                                                                                                            971 
                                                                                                                                            -
                                                                                                                                            972 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - +
                                                                                                                                            907  }
                                                                                                                                            +
                                                                                                                                            908  }
                                                                                                                                            +
                                                                                                                                            909 
                                                                                                                                            +
                                                                                                                                            910  double res = 0.0;
                                                                                                                                            +
                                                                                                                                            911  if (as_log)
                                                                                                                                            +
                                                                                                                                            912  {
                                                                                                                                            +
                                                                                                                                            913 
                                                                                                                                            +
                                                                                                                                            914  for (size_t i = 0; i < stats_target.size(); ++i)
                                                                                                                                            +
                                                                                                                                            915  res += vec_inner_prod(
                                                                                                                                            +
                                                                                                                                            916  &stats_target[i][0u],
                                                                                                                                            +
                                                                                                                                            917  &params[0u],
                                                                                                                                            +
                                                                                                                                            918  params.size()
                                                                                                                                            +
                                                                                                                                            919  ) BARRY_SAFE_EXP;
                                                                                                                                            +
                                                                                                                                            920 
                                                                                                                                            +
                                                                                                                                            921  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            922  #pragma omp simd reduction(-:res)
                                                                                                                                            +
                                                                                                                                            923  #endif
                                                                                                                                            +
                                                                                                                                            924  for (size_t i = 0u; i < params_last_size; ++i)
                                                                                                                                            +
                                                                                                                                            925  res -= (std::log(normalizing_constants[i]) * this->stats_support_n_arrays[i]);
                                                                                                                                            +
                                                                                                                                            926 
                                                                                                                                            +
                                                                                                                                            927  } else {
                                                                                                                                            +
                                                                                                                                            928 
                                                                                                                                            +
                                                                                                                                            929  res = 1.0;
                                                                                                                                            +
                                                                                                                                            930  size_t stats_target_size = stats_target.size();
                                                                                                                                            +
                                                                                                                                            931  #if defined(__OPENMP) || defined(_OPENMP)
                                                                                                                                            +
                                                                                                                                            932  #pragma omp simd reduction(*:res)
                                                                                                                                            +
                                                                                                                                            933  #endif
                                                                                                                                            +
                                                                                                                                            934  for (size_t i = 0; i < stats_target_size; ++i)
                                                                                                                                            +
                                                                                                                                            935  res *= std::exp(
                                                                                                                                            + +
                                                                                                                                            937  &stats_target[i][0u],
                                                                                                                                            +
                                                                                                                                            938  &params[0u],
                                                                                                                                            +
                                                                                                                                            939  params.size()
                                                                                                                                            +
                                                                                                                                            940  ) BARRY_SAFE_EXP) /
                                                                                                                                            +
                                                                                                                                            941  normalizing_constants[arrays2support[i]];
                                                                                                                                            +
                                                                                                                                            942 
                                                                                                                                            +
                                                                                                                                            943  }
                                                                                                                                            +
                                                                                                                                            944 
                                                                                                                                            +
                                                                                                                                            945  return res;
                                                                                                                                            +
                                                                                                                                            946 
                                                                                                                                            +
                                                                                                                                            947 }
                                                                                                                                            +
                                                                                                                                            948 
                                                                                                                                            +
                                                                                                                                            949 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            950 inline std::vector< double > &
                                                                                                                                            + +
                                                                                                                                            952 
                                                                                                                                            +
                                                                                                                                            953  return normalizing_constants;
                                                                                                                                            +
                                                                                                                                            954 
                                                                                                                                            +
                                                                                                                                            955 }
                                                                                                                                            +
                                                                                                                                            956 
                                                                                                                                            +
                                                                                                                                            957 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            958 inline const std::vector< Array_Type > *
                                                                                                                                            + +
                                                                                                                                            960  const size_t & i
                                                                                                                                            +
                                                                                                                                            961 ) {
                                                                                                                                            +
                                                                                                                                            962 
                                                                                                                                            +
                                                                                                                                            963  if (i >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            964  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            965 
                                                                                                                                            +
                                                                                                                                            966 
                                                                                                                                            +
                                                                                                                                            967  return &pset_arrays[arrays2support[i]];
                                                                                                                                            +
                                                                                                                                            968 
                                                                                                                                            +
                                                                                                                                            969 }
                                                                                                                                            +
                                                                                                                                            970 
                                                                                                                                            +
                                                                                                                                            971 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            972 inline const std::vector< double > *
                                                                                                                                            +
                                                                                                                                            974  const size_t & i
                                                                                                                                            975 ) {
                                                                                                                                            976 
                                                                                                                                            977  if (i >= arrays2support.size())
                                                                                                                                            978  throw std::range_error("The requested support is out of range");
                                                                                                                                            979 
                                                                                                                                            -
                                                                                                                                            980 
                                                                                                                                            -
                                                                                                                                            981  return &pset_arrays[arrays2support[i]];
                                                                                                                                            -
                                                                                                                                            982 
                                                                                                                                            -
                                                                                                                                            983 }
                                                                                                                                            -
                                                                                                                                            984 
                                                                                                                                            -
                                                                                                                                            985 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            987  const size_t & i
                                                                                                                                            -
                                                                                                                                            988 ) {
                                                                                                                                            -
                                                                                                                                            989 
                                                                                                                                            -
                                                                                                                                            990  if (i >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            991  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            980  return &pset_stats[arrays2support[i]];
                                                                                                                                            +
                                                                                                                                            981 
                                                                                                                                            +
                                                                                                                                            982 }
                                                                                                                                            +
                                                                                                                                            983 
                                                                                                                                            +
                                                                                                                                            984 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            986 {
                                                                                                                                            +
                                                                                                                                            987 
                                                                                                                                            +
                                                                                                                                            988  if (i >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            989  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            990 
                                                                                                                                            +
                                                                                                                                            991  const auto & S = stats_support[arrays2support[i]];
                                                                                                                                            992 
                                                                                                                                            -
                                                                                                                                            993  return &pset_stats[arrays2support[i]];
                                                                                                                                            -
                                                                                                                                            994 
                                                                                                                                            -
                                                                                                                                            995 }
                                                                                                                                            -
                                                                                                                                            996 
                                                                                                                                            -
                                                                                                                                            997 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            999 {
                                                                                                                                            -
                                                                                                                                            1000 
                                                                                                                                            -
                                                                                                                                            1001  if (i >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            1002  throw std::range_error("The requested support is out of range");
                                                                                                                                            -
                                                                                                                                            1003 
                                                                                                                                            -
                                                                                                                                            1004  const auto & S = stats_support[arrays2support[i]];
                                                                                                                                            +
                                                                                                                                            993  size_t k = nterms();
                                                                                                                                            +
                                                                                                                                            994  size_t nunique = S.size() / (k + 1u);
                                                                                                                                            +
                                                                                                                                            995 
                                                                                                                                            +
                                                                                                                                            996  for (size_t l = 0u; l < nunique; ++l)
                                                                                                                                            +
                                                                                                                                            997  {
                                                                                                                                            +
                                                                                                                                            998 
                                                                                                                                            +
                                                                                                                                            999  printf_barry("% 5li ", l);
                                                                                                                                            +
                                                                                                                                            1000 
                                                                                                                                            +
                                                                                                                                            1001  printf_barry("counts: %.0f motif: ", S[l * (k + 1u)]);
                                                                                                                                            +
                                                                                                                                            1002 
                                                                                                                                            +
                                                                                                                                            1003  for (size_t j = 0u; j < k; ++j)
                                                                                                                                            +
                                                                                                                                            1004  printf_barry("%.2f, ", S[l * (k + 1) + j + 1]);
                                                                                                                                            1005 
                                                                                                                                            -
                                                                                                                                            1006  size_t k = nterms();
                                                                                                                                            -
                                                                                                                                            1007  size_t nunique = S.size() / (k + 1u);
                                                                                                                                            -
                                                                                                                                            1008 
                                                                                                                                            -
                                                                                                                                            1009  for (size_t l = 0u; l < nunique; ++l)
                                                                                                                                            -
                                                                                                                                            1010  {
                                                                                                                                            -
                                                                                                                                            1011 
                                                                                                                                            -
                                                                                                                                            1012  printf_barry("% 5li ", l);
                                                                                                                                            +
                                                                                                                                            1006  printf_barry("\n");
                                                                                                                                            +
                                                                                                                                            1007 
                                                                                                                                            +
                                                                                                                                            1008  }
                                                                                                                                            +
                                                                                                                                            1009 
                                                                                                                                            +
                                                                                                                                            1010  return;
                                                                                                                                            +
                                                                                                                                            1011 
                                                                                                                                            +
                                                                                                                                            1012 }
                                                                                                                                            1013 
                                                                                                                                            -
                                                                                                                                            1014  printf_barry("counts: %.0f motif: ", S[l * (k + 1u)]);
                                                                                                                                            -
                                                                                                                                            1015 
                                                                                                                                            -
                                                                                                                                            1016  for (size_t j = 0u; j < k; ++j)
                                                                                                                                            -
                                                                                                                                            1017  printf_barry("%.2f, ", S[l * (k + 1) + j + 1]);
                                                                                                                                            -
                                                                                                                                            1018 
                                                                                                                                            -
                                                                                                                                            1019  printf_barry("\n");
                                                                                                                                            -
                                                                                                                                            1020 
                                                                                                                                            -
                                                                                                                                            1021  }
                                                                                                                                            -
                                                                                                                                            1022 
                                                                                                                                            -
                                                                                                                                            1023  return;
                                                                                                                                            -
                                                                                                                                            1024 
                                                                                                                                            -
                                                                                                                                            1025 }
                                                                                                                                            -
                                                                                                                                            1026 
                                                                                                                                            -
                                                                                                                                            1027 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1029 {
                                                                                                                                            -
                                                                                                                                            1030 
                                                                                                                                            -
                                                                                                                                            1031  // Relevant information:
                                                                                                                                            -
                                                                                                                                            1032  // - Number of arrays involved
                                                                                                                                            -
                                                                                                                                            1033  // - Size of the support
                                                                                                                                            -
                                                                                                                                            1034  // - Terms involved
                                                                                                                                            -
                                                                                                                                            1035 
                                                                                                                                            -
                                                                                                                                            1036  int min_v = std::numeric_limits<int>::max();
                                                                                                                                            -
                                                                                                                                            1037  int max_v = 0;
                                                                                                                                            -
                                                                                                                                            1038 
                                                                                                                                            -
                                                                                                                                            1039  for (const auto & stat : this->stats_support)
                                                                                                                                            -
                                                                                                                                            1040  {
                                                                                                                                            -
                                                                                                                                            1041 
                                                                                                                                            -
                                                                                                                                            1042  if (static_cast<int>(stat.size()) > max_v)
                                                                                                                                            -
                                                                                                                                            1043  max_v = static_cast<int>(stat.size());
                                                                                                                                            -
                                                                                                                                            1044 
                                                                                                                                            -
                                                                                                                                            1045  if (static_cast<int>(stat.size()) < min_v)
                                                                                                                                            -
                                                                                                                                            1046  min_v = static_cast<int>(stat.size());
                                                                                                                                            -
                                                                                                                                            1047 
                                                                                                                                            -
                                                                                                                                            1048  }
                                                                                                                                            -
                                                                                                                                            1049 
                                                                                                                                            -
                                                                                                                                            1050  // The vectors in the support reflec the size of nterms x entries
                                                                                                                                            -
                                                                                                                                            1051  max_v /= static_cast<int>(nterms() + 1);
                                                                                                                                            -
                                                                                                                                            1052  min_v /= static_cast<int>(nterms() + 1);
                                                                                                                                            -
                                                                                                                                            1053 
                                                                                                                                            -
                                                                                                                                            1054  printf_barry("Num. of Arrays : %li\n", this->size());
                                                                                                                                            -
                                                                                                                                            1055  printf_barry("Support size : %li\n", this->size_unique());
                                                                                                                                            -
                                                                                                                                            1056  printf_barry("Support size range : [%i, %i]\n", min_v, max_v);
                                                                                                                                            -
                                                                                                                                            1057  printf_barry("Transform. Fun. : %s\n", transform_model_fun ? "yes": "no");
                                                                                                                                            -
                                                                                                                                            1058  printf_barry("Model terms (%li) :\n", this->nterms());
                                                                                                                                            -
                                                                                                                                            1059  for (auto & cn : this->colnames())
                                                                                                                                            -
                                                                                                                                            1060  {
                                                                                                                                            -
                                                                                                                                            1061  printf_barry(" - %s\n", cn.c_str());
                                                                                                                                            -
                                                                                                                                            1062  }
                                                                                                                                            -
                                                                                                                                            1063 
                                                                                                                                            -
                                                                                                                                            1064  if (this->nrules() > 0u)
                                                                                                                                            -
                                                                                                                                            1065  {
                                                                                                                                            -
                                                                                                                                            1066  printf_barry("Model rules (%li) :\n", this->nrules());
                                                                                                                                            -
                                                                                                                                            1067 
                                                                                                                                            -
                                                                                                                                            1068  for (auto & rn : rules->get_names())
                                                                                                                                            -
                                                                                                                                            1069  {
                                                                                                                                            -
                                                                                                                                            1070  printf_barry(" - %s\n", rn.c_str());
                                                                                                                                            -
                                                                                                                                            1071  }
                                                                                                                                            -
                                                                                                                                            1072  }
                                                                                                                                            -
                                                                                                                                            1073 
                                                                                                                                            -
                                                                                                                                            1074  if (this->nrules_dyn() > 0u)
                                                                                                                                            -
                                                                                                                                            1075  {
                                                                                                                                            -
                                                                                                                                            1076  printf_barry("Model rules dyn (%li):\n", this->nrules_dyn());
                                                                                                                                            -
                                                                                                                                            1077 
                                                                                                                                            -
                                                                                                                                            1078  for (auto & rn : rules_dyn->get_names())
                                                                                                                                            -
                                                                                                                                            1079  {
                                                                                                                                            -
                                                                                                                                            1080  printf_barry(" - %s\n", rn.c_str());
                                                                                                                                            -
                                                                                                                                            1081  }
                                                                                                                                            -
                                                                                                                                            1082  }
                                                                                                                                            -
                                                                                                                                            1083 
                                                                                                                                            -
                                                                                                                                            1084  return;
                                                                                                                                            -
                                                                                                                                            1085 
                                                                                                                                            -
                                                                                                                                            1086 }
                                                                                                                                            -
                                                                                                                                            1087 
                                                                                                                                            -
                                                                                                                                            1088 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1090 {
                                                                                                                                            -
                                                                                                                                            1091  // INITIALIZED()
                                                                                                                                            -
                                                                                                                                            1092  return this->stats_target.size();
                                                                                                                                            -
                                                                                                                                            1093 
                                                                                                                                            -
                                                                                                                                            1094 }
                                                                                                                                            +
                                                                                                                                            1014 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1016 {
                                                                                                                                            +
                                                                                                                                            1017 
                                                                                                                                            +
                                                                                                                                            1018  // Relevant information:
                                                                                                                                            +
                                                                                                                                            1019  // - Number of arrays involved
                                                                                                                                            +
                                                                                                                                            1020  // - Size of the support
                                                                                                                                            +
                                                                                                                                            1021  // - Terms involved
                                                                                                                                            +
                                                                                                                                            1022 
                                                                                                                                            +
                                                                                                                                            1023  int min_v = std::numeric_limits<int>::max();
                                                                                                                                            +
                                                                                                                                            1024  int max_v = 0;
                                                                                                                                            +
                                                                                                                                            1025 
                                                                                                                                            +
                                                                                                                                            1026  for (const auto & stat : this->stats_support)
                                                                                                                                            +
                                                                                                                                            1027  {
                                                                                                                                            +
                                                                                                                                            1028 
                                                                                                                                            +
                                                                                                                                            1029  if (static_cast<int>(stat.size()) > max_v)
                                                                                                                                            +
                                                                                                                                            1030  max_v = static_cast<int>(stat.size());
                                                                                                                                            +
                                                                                                                                            1031 
                                                                                                                                            +
                                                                                                                                            1032  if (static_cast<int>(stat.size()) < min_v)
                                                                                                                                            +
                                                                                                                                            1033  min_v = static_cast<int>(stat.size());
                                                                                                                                            +
                                                                                                                                            1034 
                                                                                                                                            +
                                                                                                                                            1035  }
                                                                                                                                            +
                                                                                                                                            1036 
                                                                                                                                            +
                                                                                                                                            1037  // The vectors in the support reflec the size of nterms x entries
                                                                                                                                            +
                                                                                                                                            1038  max_v /= static_cast<int>(nterms() + 1);
                                                                                                                                            +
                                                                                                                                            1039  min_v /= static_cast<int>(nterms() + 1);
                                                                                                                                            +
                                                                                                                                            1040 
                                                                                                                                            +
                                                                                                                                            1041  printf_barry("Num. of Arrays : %li\n", this->size());
                                                                                                                                            +
                                                                                                                                            1042  printf_barry("Support size : %li\n", this->size_unique());
                                                                                                                                            +
                                                                                                                                            1043  printf_barry("Support size range : [%i, %i]\n", min_v, max_v);
                                                                                                                                            +
                                                                                                                                            1044  printf_barry("Transform. Fun. : %s\n", transform_model_fun ? "yes": "no");
                                                                                                                                            +
                                                                                                                                            1045  printf_barry("Model terms (%li) :\n", this->nterms());
                                                                                                                                            +
                                                                                                                                            1046  for (auto & cn : this->colnames())
                                                                                                                                            +
                                                                                                                                            1047  {
                                                                                                                                            +
                                                                                                                                            1048  printf_barry(" - %s\n", cn.c_str());
                                                                                                                                            +
                                                                                                                                            1049  }
                                                                                                                                            +
                                                                                                                                            1050 
                                                                                                                                            +
                                                                                                                                            1051  if (this->nrules() > 0u)
                                                                                                                                            +
                                                                                                                                            1052  {
                                                                                                                                            +
                                                                                                                                            1053  printf_barry("Model rules (%li) :\n", this->nrules());
                                                                                                                                            +
                                                                                                                                            1054 
                                                                                                                                            +
                                                                                                                                            1055  for (auto & rn : rules->get_names())
                                                                                                                                            +
                                                                                                                                            1056  {
                                                                                                                                            +
                                                                                                                                            1057  printf_barry(" - %s\n", rn.c_str());
                                                                                                                                            +
                                                                                                                                            1058  }
                                                                                                                                            +
                                                                                                                                            1059  }
                                                                                                                                            +
                                                                                                                                            1060 
                                                                                                                                            +
                                                                                                                                            1061  if (this->nrules_dyn() > 0u)
                                                                                                                                            +
                                                                                                                                            1062  {
                                                                                                                                            +
                                                                                                                                            1063  printf_barry("Model rules dyn (%li):\n", this->nrules_dyn());
                                                                                                                                            +
                                                                                                                                            1064 
                                                                                                                                            +
                                                                                                                                            1065  for (auto & rn : rules_dyn->get_names())
                                                                                                                                            +
                                                                                                                                            1066  {
                                                                                                                                            +
                                                                                                                                            1067  printf_barry(" - %s\n", rn.c_str());
                                                                                                                                            +
                                                                                                                                            1068  }
                                                                                                                                            +
                                                                                                                                            1069  }
                                                                                                                                            +
                                                                                                                                            1070 
                                                                                                                                            +
                                                                                                                                            1071  return;
                                                                                                                                            +
                                                                                                                                            1072 
                                                                                                                                            +
                                                                                                                                            1073 }
                                                                                                                                            +
                                                                                                                                            1074 
                                                                                                                                            +
                                                                                                                                            1075 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1077 {
                                                                                                                                            +
                                                                                                                                            1078  // INITIALIZED()
                                                                                                                                            +
                                                                                                                                            1079  return this->stats_target.size();
                                                                                                                                            +
                                                                                                                                            1080 
                                                                                                                                            +
                                                                                                                                            1081 }
                                                                                                                                            +
                                                                                                                                            1082 
                                                                                                                                            +
                                                                                                                                            1083 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1085 {
                                                                                                                                            +
                                                                                                                                            1086 
                                                                                                                                            +
                                                                                                                                            1087  // INITIALIZED()
                                                                                                                                            +
                                                                                                                                            1088  return this->stats_support.size();
                                                                                                                                            +
                                                                                                                                            1089 
                                                                                                                                            +
                                                                                                                                            1090 }
                                                                                                                                            +
                                                                                                                                            1091 
                                                                                                                                            +
                                                                                                                                            1092 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1094 {
                                                                                                                                            1095 
                                                                                                                                            -
                                                                                                                                            1096 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1098 {
                                                                                                                                            -
                                                                                                                                            1099 
                                                                                                                                            -
                                                                                                                                            1100  // INITIALIZED()
                                                                                                                                            -
                                                                                                                                            1101  return this->stats_support.size();
                                                                                                                                            +
                                                                                                                                            1096  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            1097  return transform_model_term_names.size();
                                                                                                                                            +
                                                                                                                                            1098  else
                                                                                                                                            +
                                                                                                                                            1099  return this->counters->size();
                                                                                                                                            +
                                                                                                                                            1100 
                                                                                                                                            +
                                                                                                                                            1101 }
                                                                                                                                            1102 
                                                                                                                                            -
                                                                                                                                            1103 }
                                                                                                                                            -
                                                                                                                                            1104 
                                                                                                                                            -
                                                                                                                                            1105 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1107 {
                                                                                                                                            +
                                                                                                                                            1103 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1105 {
                                                                                                                                            +
                                                                                                                                            1106 
                                                                                                                                            +
                                                                                                                                            1107  return this->rules->size();
                                                                                                                                            1108 
                                                                                                                                            -
                                                                                                                                            1109  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            1110  return transform_model_term_names.size();
                                                                                                                                            -
                                                                                                                                            1111  else
                                                                                                                                            -
                                                                                                                                            1112  return this->counters->size();
                                                                                                                                            -
                                                                                                                                            1113 
                                                                                                                                            -
                                                                                                                                            1114 }
                                                                                                                                            -
                                                                                                                                            1115 
                                                                                                                                            -
                                                                                                                                            1116 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1118 {
                                                                                                                                            -
                                                                                                                                            1119 
                                                                                                                                            -
                                                                                                                                            1120  return this->rules->size();
                                                                                                                                            -
                                                                                                                                            1121 
                                                                                                                                            -
                                                                                                                                            1122 }
                                                                                                                                            -
                                                                                                                                            1123 
                                                                                                                                            -
                                                                                                                                            1124 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1126 {
                                                                                                                                            +
                                                                                                                                            1109 }
                                                                                                                                            +
                                                                                                                                            1110 
                                                                                                                                            +
                                                                                                                                            1111 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1113 {
                                                                                                                                            +
                                                                                                                                            1114 
                                                                                                                                            +
                                                                                                                                            1115  return this->rules_dyn->size();
                                                                                                                                            +
                                                                                                                                            1116 
                                                                                                                                            +
                                                                                                                                            1117 }
                                                                                                                                            +
                                                                                                                                            1118 
                                                                                                                                            +
                                                                                                                                            1119 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1121 {
                                                                                                                                            +
                                                                                                                                            1122 
                                                                                                                                            +
                                                                                                                                            1123  // INITIALIZED()
                                                                                                                                            +
                                                                                                                                            1124  size_t tot = 0u;
                                                                                                                                            +
                                                                                                                                            1125  for (auto& a : stats_support)
                                                                                                                                            +
                                                                                                                                            1126  tot += a.size();
                                                                                                                                            1127 
                                                                                                                                            -
                                                                                                                                            1128  return this->rules_dyn->size();
                                                                                                                                            +
                                                                                                                                            1128  return tot;
                                                                                                                                            1129 
                                                                                                                                            1130 }
                                                                                                                                            1131 
                                                                                                                                            1132 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1134 {
                                                                                                                                            -
                                                                                                                                            1135 
                                                                                                                                            -
                                                                                                                                            1136  // INITIALIZED()
                                                                                                                                            -
                                                                                                                                            1137  size_t tot = 0u;
                                                                                                                                            -
                                                                                                                                            1138  for (auto& a : stats_support)
                                                                                                                                            -
                                                                                                                                            1139  tot += a.size();
                                                                                                                                            + +
                                                                                                                                            1134 {
                                                                                                                                            +
                                                                                                                                            1135 
                                                                                                                                            +
                                                                                                                                            1136  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            1137  return transform_model_term_names;
                                                                                                                                            +
                                                                                                                                            1138  else
                                                                                                                                            +
                                                                                                                                            1139  return counters->get_names();
                                                                                                                                            1140 
                                                                                                                                            -
                                                                                                                                            1141  return tot;
                                                                                                                                            -
                                                                                                                                            1142 
                                                                                                                                            -
                                                                                                                                            1143 }
                                                                                                                                            -
                                                                                                                                            1144 
                                                                                                                                            -
                                                                                                                                            1145 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1147 {
                                                                                                                                            -
                                                                                                                                            1148 
                                                                                                                                            -
                                                                                                                                            1149  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            1150  return transform_model_term_names;
                                                                                                                                            -
                                                                                                                                            1151  else
                                                                                                                                            -
                                                                                                                                            1152  return counters->get_names();
                                                                                                                                            -
                                                                                                                                            1153 
                                                                                                                                            -
                                                                                                                                            1154 }
                                                                                                                                            -
                                                                                                                                            1155 
                                                                                                                                            -
                                                                                                                                            1156 template <
                                                                                                                                            -
                                                                                                                                            1157  typename Array_Type,
                                                                                                                                            -
                                                                                                                                            1158  typename Data_Counter_Type,
                                                                                                                                            -
                                                                                                                                            1159  typename Data_Rule_Type,
                                                                                                                                            -
                                                                                                                                            1160  typename Data_Rule_Dyn_Type
                                                                                                                                            -
                                                                                                                                            1161  >
                                                                                                                                            - -
                                                                                                                                            1163  const size_t & i,
                                                                                                                                            -
                                                                                                                                            1164  const std::vector<double> & params
                                                                                                                                            -
                                                                                                                                            1165 ) {
                                                                                                                                            -
                                                                                                                                            1166 
                                                                                                                                            -
                                                                                                                                            1167  // Are we recording this?
                                                                                                                                            -
                                                                                                                                            1168  if (!this->with_pset)
                                                                                                                                            -
                                                                                                                                            1169  throw std::logic_error("Sampling is only available when store_pset() is active.");
                                                                                                                                            -
                                                                                                                                            1170 
                                                                                                                                            -
                                                                                                                                            1171  if (i >= arrays2support.size())
                                                                                                                                            -
                                                                                                                                            1172  throw std::range_error("The requested support is out of range");
                                                                                                                                            -
                                                                                                                                            1173 
                                                                                                                                            -
                                                                                                                                            1174  // Getting the index
                                                                                                                                            -
                                                                                                                                            1175  size_t a = arrays2support[i];
                                                                                                                                            -
                                                                                                                                            1176 
                                                                                                                                            -
                                                                                                                                            1177  // Generating a random
                                                                                                                                            -
                                                                                                                                            1178  std::uniform_real_distribution<> urand(0, 1);
                                                                                                                                            -
                                                                                                                                            1179  double r = urand(*rengine);
                                                                                                                                            -
                                                                                                                                            1180  double cumprob = 0.0;
                                                                                                                                            +
                                                                                                                                            1141 }
                                                                                                                                            +
                                                                                                                                            1142 
                                                                                                                                            +
                                                                                                                                            1143 template <
                                                                                                                                            +
                                                                                                                                            1144  typename Array_Type,
                                                                                                                                            +
                                                                                                                                            1145  typename Data_Counter_Type,
                                                                                                                                            +
                                                                                                                                            1146  typename Data_Rule_Type,
                                                                                                                                            +
                                                                                                                                            1147  typename Data_Rule_Dyn_Type
                                                                                                                                            +
                                                                                                                                            1148  >
                                                                                                                                            +
                                                                                                                                            1149 inline Array_Type
                                                                                                                                            + +
                                                                                                                                            1151  const size_t & i,
                                                                                                                                            +
                                                                                                                                            1152  const std::vector<double> & params
                                                                                                                                            +
                                                                                                                                            1153 ) {
                                                                                                                                            +
                                                                                                                                            1154 
                                                                                                                                            +
                                                                                                                                            1155  // Are we recording this?
                                                                                                                                            +
                                                                                                                                            1156  if (!this->with_pset)
                                                                                                                                            +
                                                                                                                                            1157  throw std::logic_error("Sampling is only available when store_pset() is active.");
                                                                                                                                            +
                                                                                                                                            1158 
                                                                                                                                            +
                                                                                                                                            1159  if (i >= arrays2support.size())
                                                                                                                                            +
                                                                                                                                            1160  throw std::range_error("The requested support is out of range");
                                                                                                                                            +
                                                                                                                                            1161 
                                                                                                                                            +
                                                                                                                                            1162  // Getting the index
                                                                                                                                            +
                                                                                                                                            1163  size_t a = arrays2support[i];
                                                                                                                                            +
                                                                                                                                            1164 
                                                                                                                                            +
                                                                                                                                            1165  // Generating a random
                                                                                                                                            +
                                                                                                                                            1166  std::uniform_real_distribution<> urand(0, 1);
                                                                                                                                            +
                                                                                                                                            1167  double r = urand(*rengine);
                                                                                                                                            +
                                                                                                                                            1168  double cumprob = 0.0;
                                                                                                                                            +
                                                                                                                                            1169 
                                                                                                                                            +
                                                                                                                                            1170  size_t k = params.size();
                                                                                                                                            +
                                                                                                                                            1171 
                                                                                                                                            +
                                                                                                                                            1172  // Sampling an array
                                                                                                                                            +
                                                                                                                                            1173  size_t j = 0u;
                                                                                                                                            +
                                                                                                                                            1174  std::vector< double > & probs = pset_probs[a];
                                                                                                                                            +
                                                                                                                                            1175  if ((probs.size() > 0u) && (vec_equal_approx(params, params_last[a])))
                                                                                                                                            +
                                                                                                                                            1176  // If precomputed, then no need to recalc support
                                                                                                                                            +
                                                                                                                                            1177  {
                                                                                                                                            +
                                                                                                                                            1178 
                                                                                                                                            +
                                                                                                                                            1179  while (cumprob < r)
                                                                                                                                            +
                                                                                                                                            1180  cumprob += probs[j++];
                                                                                                                                            1181 
                                                                                                                                            -
                                                                                                                                            1182  size_t k = params.size();
                                                                                                                                            -
                                                                                                                                            1183 
                                                                                                                                            -
                                                                                                                                            1184  // Sampling an array
                                                                                                                                            -
                                                                                                                                            1185  size_t j = 0u;
                                                                                                                                            -
                                                                                                                                            1186  std::vector< double > & probs = pset_probs[a];
                                                                                                                                            -
                                                                                                                                            1187  if ((probs.size() > 0u) && (vec_equal_approx(params, params_last[a])))
                                                                                                                                            -
                                                                                                                                            1188  // If precomputed, then no need to recalc support
                                                                                                                                            -
                                                                                                                                            1189  {
                                                                                                                                            +
                                                                                                                                            1182  if (j > 0u)
                                                                                                                                            +
                                                                                                                                            1183  j--;
                                                                                                                                            +
                                                                                                                                            1184 
                                                                                                                                            +
                                                                                                                                            1185  } else {
                                                                                                                                            +
                                                                                                                                            1186 
                                                                                                                                            +
                                                                                                                                            1187  probs.resize(pset_arrays[a].size());
                                                                                                                                            +
                                                                                                                                            1188  std::vector< double > temp_stats(params.size());
                                                                                                                                            +
                                                                                                                                            1189  const std::vector< double > & stats = pset_stats[a];
                                                                                                                                            1190 
                                                                                                                                            -
                                                                                                                                            1191  while (cumprob < r)
                                                                                                                                            -
                                                                                                                                            1192  cumprob += probs[j++];
                                                                                                                                            -
                                                                                                                                            1193 
                                                                                                                                            -
                                                                                                                                            1194  if (j > 0u)
                                                                                                                                            -
                                                                                                                                            1195  j--;
                                                                                                                                            -
                                                                                                                                            1196 
                                                                                                                                            -
                                                                                                                                            1197  } else {
                                                                                                                                            -
                                                                                                                                            1198 
                                                                                                                                            -
                                                                                                                                            1199  probs.resize(pset_arrays[a].size());
                                                                                                                                            -
                                                                                                                                            1200  std::vector< double > temp_stats(params.size());
                                                                                                                                            -
                                                                                                                                            1201  const std::vector< double > & stats = pset_stats[a];
                                                                                                                                            -
                                                                                                                                            1202 
                                                                                                                                            -
                                                                                                                                            1203  int i_matches = -1;
                                                                                                                                            -
                                                                                                                                            1204  for (size_t array = 0u; array < probs.size(); ++array)
                                                                                                                                            -
                                                                                                                                            1205  {
                                                                                                                                            -
                                                                                                                                            1206 
                                                                                                                                            -
                                                                                                                                            1207  // Filling out the parameters
                                                                                                                                            -
                                                                                                                                            1208  for (auto p = 0u; p < params.size(); ++p)
                                                                                                                                            -
                                                                                                                                            1209  temp_stats[p] = stats[array * k + p];
                                                                                                                                            -
                                                                                                                                            1210 
                                                                                                                                            -
                                                                                                                                            1211  probs[array] = this->likelihood(params, temp_stats, i, false);
                                                                                                                                            -
                                                                                                                                            1212  cumprob += probs[array];
                                                                                                                                            -
                                                                                                                                            1213 
                                                                                                                                            -
                                                                                                                                            1214  if (i_matches == -1 && cumprob >= r)
                                                                                                                                            -
                                                                                                                                            1215  i_matches = array;
                                                                                                                                            -
                                                                                                                                            1216  }
                                                                                                                                            -
                                                                                                                                            1217 
                                                                                                                                            -
                                                                                                                                            1218  #ifdef BARRY_DEBUG
                                                                                                                                            -
                                                                                                                                            1219  if (i_matches < 0)
                                                                                                                                            -
                                                                                                                                            1220  throw std::logic_error(
                                                                                                                                            -
                                                                                                                                            1221  std::string(
                                                                                                                                            -
                                                                                                                                            1222  "Something went wrong when sampling from a different set of.") +
                                                                                                                                            -
                                                                                                                                            1223  std::string("parameters. Please report this bug: ") +
                                                                                                                                            -
                                                                                                                                            1224  std::string(" cumprob: ") + std::to_string(cumprob) +
                                                                                                                                            -
                                                                                                                                            1225  std::string(" r: ") + std::to_string(r)
                                                                                                                                            -
                                                                                                                                            1226  );
                                                                                                                                            -
                                                                                                                                            1227  #endif
                                                                                                                                            +
                                                                                                                                            1191  int i_matches = -1;
                                                                                                                                            +
                                                                                                                                            1192  for (size_t array = 0u; array < probs.size(); ++array)
                                                                                                                                            +
                                                                                                                                            1193  {
                                                                                                                                            +
                                                                                                                                            1194 
                                                                                                                                            +
                                                                                                                                            1195  // Filling out the parameters
                                                                                                                                            +
                                                                                                                                            1196  for (auto p = 0u; p < params.size(); ++p)
                                                                                                                                            +
                                                                                                                                            1197  temp_stats[p] = stats[array * k + p];
                                                                                                                                            +
                                                                                                                                            1198 
                                                                                                                                            +
                                                                                                                                            1199  probs[array] = this->likelihood(params, temp_stats, i, false);
                                                                                                                                            +
                                                                                                                                            1200  cumprob += probs[array];
                                                                                                                                            +
                                                                                                                                            1201 
                                                                                                                                            +
                                                                                                                                            1202  if (i_matches == -1 && cumprob >= r)
                                                                                                                                            +
                                                                                                                                            1203  i_matches = array;
                                                                                                                                            +
                                                                                                                                            1204  }
                                                                                                                                            +
                                                                                                                                            1205 
                                                                                                                                            +
                                                                                                                                            1206  #ifdef BARRY_DEBUG
                                                                                                                                            +
                                                                                                                                            1207  if (i_matches < 0)
                                                                                                                                            +
                                                                                                                                            1208  throw std::logic_error(
                                                                                                                                            +
                                                                                                                                            1209  std::string(
                                                                                                                                            +
                                                                                                                                            1210  "Something went wrong when sampling from a different set of.") +
                                                                                                                                            +
                                                                                                                                            1211  std::string("parameters. Please report this bug: ") +
                                                                                                                                            +
                                                                                                                                            1212  std::string(" cumprob: ") + std::to_string(cumprob) +
                                                                                                                                            +
                                                                                                                                            1213  std::string(" r: ") + std::to_string(r)
                                                                                                                                            +
                                                                                                                                            1214  );
                                                                                                                                            +
                                                                                                                                            1215  #endif
                                                                                                                                            +
                                                                                                                                            1216 
                                                                                                                                            +
                                                                                                                                            1217  j = i_matches;
                                                                                                                                            +
                                                                                                                                            1218 
                                                                                                                                            +
                                                                                                                                            1219  }
                                                                                                                                            +
                                                                                                                                            1220 
                                                                                                                                            +
                                                                                                                                            1221  #ifdef BARRY_DEBUG
                                                                                                                                            +
                                                                                                                                            1222  return this->pset_arrays.at(a).at(j);
                                                                                                                                            +
                                                                                                                                            1223  #else
                                                                                                                                            +
                                                                                                                                            1224  return this->pset_arrays[a][j];
                                                                                                                                            +
                                                                                                                                            1225  #endif
                                                                                                                                            +
                                                                                                                                            1226 
                                                                                                                                            +
                                                                                                                                            1227 }
                                                                                                                                            1228 
                                                                                                                                            -
                                                                                                                                            1229  j = i_matches;
                                                                                                                                            -
                                                                                                                                            1230 
                                                                                                                                            -
                                                                                                                                            1231  }
                                                                                                                                            -
                                                                                                                                            1232 
                                                                                                                                            -
                                                                                                                                            1233  #ifdef BARRY_DEBUG
                                                                                                                                            -
                                                                                                                                            1234  return this->pset_arrays.at(a).at(j);
                                                                                                                                            -
                                                                                                                                            1235  #else
                                                                                                                                            -
                                                                                                                                            1236  return this->pset_arrays[a][j];
                                                                                                                                            -
                                                                                                                                            1237  #endif
                                                                                                                                            +
                                                                                                                                            1229 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1231  const Array_Type & Array_,
                                                                                                                                            +
                                                                                                                                            1232  const std::vector<double> & params
                                                                                                                                            +
                                                                                                                                            1233 ) {
                                                                                                                                            +
                                                                                                                                            1234 
                                                                                                                                            +
                                                                                                                                            1235  // Are we recording this?
                                                                                                                                            +
                                                                                                                                            1236  if (!this->with_pset)
                                                                                                                                            +
                                                                                                                                            1237  throw std::logic_error("Sampling is only available when store_pset() is active.");
                                                                                                                                            1238 
                                                                                                                                            -
                                                                                                                                            1239 }
                                                                                                                                            +
                                                                                                                                            1239  size_t i;
                                                                                                                                            1240 
                                                                                                                                            -
                                                                                                                                            1241 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1243  const Array_Type & Array_,
                                                                                                                                            -
                                                                                                                                            1244  const std::vector<double> & params
                                                                                                                                            -
                                                                                                                                            1245 ) {
                                                                                                                                            -
                                                                                                                                            1246 
                                                                                                                                            -
                                                                                                                                            1247  // Are we recording this?
                                                                                                                                            -
                                                                                                                                            1248  if (!this->with_pset)
                                                                                                                                            -
                                                                                                                                            1249  throw std::logic_error("Sampling is only available when store_pset() is active.");
                                                                                                                                            -
                                                                                                                                            1250 
                                                                                                                                            -
                                                                                                                                            1251  size_t i;
                                                                                                                                            -
                                                                                                                                            1252 
                                                                                                                                            -
                                                                                                                                            1253  // If the data hasn't been analyzed earlier, then we need to compute
                                                                                                                                            -
                                                                                                                                            1254  // the support
                                                                                                                                            -
                                                                                                                                            1255  std::vector< double > key = counters->gen_hash(Array_);
                                                                                                                                            -
                                                                                                                                            1256  MapVec_type< double, size_t >::const_iterator locator = keys2support.find(key);
                                                                                                                                            -
                                                                                                                                            1257  if (locator == keys2support.end())
                                                                                                                                            -
                                                                                                                                            1258  {
                                                                                                                                            -
                                                                                                                                            1259  // throw std::out_of_range("Sampling from an array that has no support in the model.");
                                                                                                                                            -
                                                                                                                                            1260 
                                                                                                                                            -
                                                                                                                                            1261  // Adding to the map
                                                                                                                                            -
                                                                                                                                            1262  keys2support[key] = stats_support.size();
                                                                                                                                            -
                                                                                                                                            1263  stats_support_n_arrays.push_back(1u); // How many elements now
                                                                                                                                            -
                                                                                                                                            1264  arrays2support.push_back(stats_support.size()); // Map of the array id to the support
                                                                                                                                            -
                                                                                                                                            1265 
                                                                                                                                            -
                                                                                                                                            1266  // Computing support using the counters included in the model
                                                                                                                                            -
                                                                                                                                            1267  support_fun.reset_array(Array_);
                                                                                                                                            -
                                                                                                                                            1268 
                                                                                                                                            -
                                                                                                                                            1271  if (with_pset)
                                                                                                                                            -
                                                                                                                                            1272  {
                                                                                                                                            -
                                                                                                                                            1273 
                                                                                                                                            -
                                                                                                                                            1274  // Making space for storing the support
                                                                                                                                            -
                                                                                                                                            1275  pset_arrays.resize(pset_arrays.size() + 1u);
                                                                                                                                            -
                                                                                                                                            1276  pset_stats.resize(pset_stats.size() + 1u);
                                                                                                                                            -
                                                                                                                                            1277  pset_probs.resize(pset_probs.size() + 1u);
                                                                                                                                            -
                                                                                                                                            1278 
                                                                                                                                            -
                                                                                                                                            1279  try
                                                                                                                                            -
                                                                                                                                            1280  {
                                                                                                                                            -
                                                                                                                                            1281 
                                                                                                                                            -
                                                                                                                                            1282  support_fun.calc(
                                                                                                                                            -
                                                                                                                                            1283  &(pset_arrays[pset_arrays.size() - 1u]),
                                                                                                                                            -
                                                                                                                                            1284  &(pset_stats[pset_stats.size() - 1u])
                                                                                                                                            -
                                                                                                                                            1285  );
                                                                                                                                            -
                                                                                                                                            1286 
                                                                                                                                            -
                                                                                                                                            1287  }
                                                                                                                                            -
                                                                                                                                            1288  catch (const std::exception& e)
                                                                                                                                            -
                                                                                                                                            1289  {
                                                                                                                                            -
                                                                                                                                            1290 
                                                                                                                                            -
                                                                                                                                            1291  printf_barry(
                                                                                                                                            -
                                                                                                                                            1292  "A problem ocurred while trying to add the array (and recording the powerset). "
                                                                                                                                            -
                                                                                                                                            1293  );
                                                                                                                                            -
                                                                                                                                            1294  printf_barry("with error %s\n", e.what());
                                                                                                                                            -
                                                                                                                                            1295  throw std::logic_error("");
                                                                                                                                            -
                                                                                                                                            1296 
                                                                                                                                            -
                                                                                                                                            1297  }
                                                                                                                                            -
                                                                                                                                            1298 
                                                                                                                                            -
                                                                                                                                            1299  }
                                                                                                                                            -
                                                                                                                                            1300  else
                                                                                                                                            -
                                                                                                                                            1301  {
                                                                                                                                            -
                                                                                                                                            1302  support_fun.calc();
                                                                                                                                            -
                                                                                                                                            1303  }
                                                                                                                                            -
                                                                                                                                            1304 
                                                                                                                                            -
                                                                                                                                            1305  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            1306  {
                                                                                                                                            -
                                                                                                                                            1307  auto tmpsupport = support_fun.get_counts();
                                                                                                                                            -
                                                                                                                                            1308  size_t k = counter_fun.size();
                                                                                                                                            -
                                                                                                                                            1309  size_t n = tmpsupport.size() / (k + 1);
                                                                                                                                            -
                                                                                                                                            1310 
                                                                                                                                            -
                                                                                                                                            1311  std::vector< double > s_new(0u);
                                                                                                                                            -
                                                                                                                                            1312  s_new.reserve(tmpsupport.size());
                                                                                                                                            +
                                                                                                                                            1241  // If the data hasn't been analyzed earlier, then we need to compute
                                                                                                                                            +
                                                                                                                                            1242  // the support
                                                                                                                                            +
                                                                                                                                            1243  std::vector< double > key = counters->gen_hash(Array_);
                                                                                                                                            +
                                                                                                                                            1244  MapVec_type< double, size_t >::const_iterator locator = keys2support.find(key);
                                                                                                                                            +
                                                                                                                                            1245  if (locator == keys2support.end())
                                                                                                                                            +
                                                                                                                                            1246  {
                                                                                                                                            +
                                                                                                                                            1247  // throw std::out_of_range("Sampling from an array that has no support in the model.");
                                                                                                                                            +
                                                                                                                                            1248 
                                                                                                                                            +
                                                                                                                                            1249  // Adding to the map
                                                                                                                                            +
                                                                                                                                            1250  keys2support[key] = stats_support.size();
                                                                                                                                            +
                                                                                                                                            1251  stats_support_n_arrays.push_back(1u); // How many elements now
                                                                                                                                            +
                                                                                                                                            1252  arrays2support.push_back(stats_support.size()); // Map of the array id to the support
                                                                                                                                            +
                                                                                                                                            1253 
                                                                                                                                            +
                                                                                                                                            1254  // Computing support using the counters included in the model
                                                                                                                                            +
                                                                                                                                            1255  support_fun.reset_array(Array_);
                                                                                                                                            +
                                                                                                                                            1256 
                                                                                                                                            +
                                                                                                                                            1259  if (with_pset)
                                                                                                                                            +
                                                                                                                                            1260  {
                                                                                                                                            +
                                                                                                                                            1261 
                                                                                                                                            +
                                                                                                                                            1262  // Making space for storing the support
                                                                                                                                            +
                                                                                                                                            1263  pset_arrays.resize(pset_arrays.size() + 1u);
                                                                                                                                            +
                                                                                                                                            1264  pset_stats.resize(pset_stats.size() + 1u);
                                                                                                                                            +
                                                                                                                                            1265  pset_probs.resize(pset_probs.size() + 1u);
                                                                                                                                            +
                                                                                                                                            1266 
                                                                                                                                            +
                                                                                                                                            1267  try
                                                                                                                                            +
                                                                                                                                            1268  {
                                                                                                                                            +
                                                                                                                                            1269 
                                                                                                                                            +
                                                                                                                                            1270  support_fun.calc(
                                                                                                                                            +
                                                                                                                                            1271  &(pset_arrays[pset_arrays.size() - 1u]),
                                                                                                                                            +
                                                                                                                                            1272  &(pset_stats[pset_stats.size() - 1u])
                                                                                                                                            +
                                                                                                                                            1273  );
                                                                                                                                            +
                                                                                                                                            1274 
                                                                                                                                            +
                                                                                                                                            1275  }
                                                                                                                                            +
                                                                                                                                            1276  catch (const std::exception& e)
                                                                                                                                            +
                                                                                                                                            1277  {
                                                                                                                                            +
                                                                                                                                            1278 
                                                                                                                                            +
                                                                                                                                            1279  printf_barry(
                                                                                                                                            +
                                                                                                                                            1280  "A problem ocurred while trying to add the array (and recording the powerset). "
                                                                                                                                            +
                                                                                                                                            1281  );
                                                                                                                                            +
                                                                                                                                            1282  printf_barry("with error %s\n", e.what());
                                                                                                                                            +
                                                                                                                                            1283  throw std::logic_error("");
                                                                                                                                            +
                                                                                                                                            1284 
                                                                                                                                            +
                                                                                                                                            1285  }
                                                                                                                                            +
                                                                                                                                            1286 
                                                                                                                                            +
                                                                                                                                            1287  }
                                                                                                                                            +
                                                                                                                                            1288  else
                                                                                                                                            +
                                                                                                                                            1289  {
                                                                                                                                            +
                                                                                                                                            1290  support_fun.calc();
                                                                                                                                            +
                                                                                                                                            1291  }
                                                                                                                                            +
                                                                                                                                            1292 
                                                                                                                                            +
                                                                                                                                            1293  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            1294  {
                                                                                                                                            +
                                                                                                                                            1295  auto tmpsupport = support_fun.get_counts();
                                                                                                                                            +
                                                                                                                                            1296  size_t k = counter_fun.size();
                                                                                                                                            +
                                                                                                                                            1297  size_t n = tmpsupport.size() / (k + 1);
                                                                                                                                            +
                                                                                                                                            1298 
                                                                                                                                            +
                                                                                                                                            1299  std::vector< double > s_new(0u);
                                                                                                                                            +
                                                                                                                                            1300  s_new.reserve(tmpsupport.size());
                                                                                                                                            +
                                                                                                                                            1301 
                                                                                                                                            +
                                                                                                                                            1302  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            +
                                                                                                                                            1303  {
                                                                                                                                            +
                                                                                                                                            1304 
                                                                                                                                            +
                                                                                                                                            1305  // Appending size
                                                                                                                                            +
                                                                                                                                            1306  s_new.push_back(tmpsupport[i * (k + 1u)]);
                                                                                                                                            +
                                                                                                                                            1307 
                                                                                                                                            +
                                                                                                                                            1308  // Applying transformation and adding to the new set
                                                                                                                                            +
                                                                                                                                            1309  auto res = transform_model_fun(&tmpsupport[i * (k + 1u) + 1u], k);
                                                                                                                                            +
                                                                                                                                            1310  std::copy(res.begin(), res.end(), std::back_inserter(s_new));
                                                                                                                                            +
                                                                                                                                            1311 
                                                                                                                                            +
                                                                                                                                            1312  }
                                                                                                                                            1313 
                                                                                                                                            -
                                                                                                                                            1314  for (size_t i = 0u; i < n; ++i)
                                                                                                                                            -
                                                                                                                                            1315  {
                                                                                                                                            -
                                                                                                                                            1316 
                                                                                                                                            -
                                                                                                                                            1317  // Appending size
                                                                                                                                            -
                                                                                                                                            1318  s_new.push_back(tmpsupport[i * (k + 1u)]);
                                                                                                                                            -
                                                                                                                                            1319 
                                                                                                                                            -
                                                                                                                                            1320  // Applying transformation and adding to the new set
                                                                                                                                            -
                                                                                                                                            1321  auto res = transform_model_fun(&tmpsupport[i * (k + 1u) + 1u], k);
                                                                                                                                            -
                                                                                                                                            1322  std::copy(res.begin(), res.end(), std::back_inserter(s_new));
                                                                                                                                            -
                                                                                                                                            1323 
                                                                                                                                            -
                                                                                                                                            1324  }
                                                                                                                                            -
                                                                                                                                            1325 
                                                                                                                                            -
                                                                                                                                            1326  stats_support.push_back(s_new);
                                                                                                                                            -
                                                                                                                                            1327 
                                                                                                                                            -
                                                                                                                                            1328  } else
                                                                                                                                            -
                                                                                                                                            1329  stats_support.push_back(support_fun.get_counts());
                                                                                                                                            -
                                                                                                                                            1330 
                                                                                                                                            -
                                                                                                                                            1331  // Making room for the previous parameters. This will be used to check if
                                                                                                                                            -
                                                                                                                                            1332  // the normalizing constant has been updated or not.
                                                                                                                                            -
                                                                                                                                            1333  params_last.push_back(stats_target[0u]);
                                                                                                                                            -
                                                                                                                                            1334  normalizing_constants.push_back(0.0);
                                                                                                                                            -
                                                                                                                                            1335  first_calc_done.push_back(false);
                                                                                                                                            -
                                                                                                                                            1336 
                                                                                                                                            -
                                                                                                                                            1337  i = arrays2support.size() - 1u;
                                                                                                                                            -
                                                                                                                                            1338  } else
                                                                                                                                            -
                                                                                                                                            1339  // Retrieving the corresponding position in the support
                                                                                                                                            -
                                                                                                                                            1340  i = locator->second;
                                                                                                                                            -
                                                                                                                                            1341 
                                                                                                                                            -
                                                                                                                                            1342  // Getting the index
                                                                                                                                            -
                                                                                                                                            1343  size_t a = arrays2support[i];
                                                                                                                                            -
                                                                                                                                            1344 
                                                                                                                                            -
                                                                                                                                            1345  // Generating a random
                                                                                                                                            -
                                                                                                                                            1346  std::uniform_real_distribution<> urand(0, 1);
                                                                                                                                            -
                                                                                                                                            1347  double r = urand(*rengine);
                                                                                                                                            -
                                                                                                                                            1348  double cumprob = 0.0;
                                                                                                                                            +
                                                                                                                                            1314  stats_support.push_back(s_new);
                                                                                                                                            +
                                                                                                                                            1315 
                                                                                                                                            +
                                                                                                                                            1316  } else
                                                                                                                                            +
                                                                                                                                            1317  stats_support.push_back(support_fun.get_counts());
                                                                                                                                            +
                                                                                                                                            1318 
                                                                                                                                            +
                                                                                                                                            1319  // Making room for the previous parameters. This will be used to check if
                                                                                                                                            +
                                                                                                                                            1320  // the normalizing constant has been updated or not.
                                                                                                                                            +
                                                                                                                                            1321  params_last.push_back(stats_target[0u]);
                                                                                                                                            +
                                                                                                                                            1322  normalizing_constants.push_back(0.0);
                                                                                                                                            +
                                                                                                                                            1323  first_calc_done.push_back(false);
                                                                                                                                            +
                                                                                                                                            1324 
                                                                                                                                            +
                                                                                                                                            1325  i = arrays2support.size() - 1u;
                                                                                                                                            +
                                                                                                                                            1326  } else
                                                                                                                                            +
                                                                                                                                            1327  // Retrieving the corresponding position in the support
                                                                                                                                            +
                                                                                                                                            1328  i = locator->second;
                                                                                                                                            +
                                                                                                                                            1329 
                                                                                                                                            +
                                                                                                                                            1330  // Getting the index
                                                                                                                                            +
                                                                                                                                            1331  size_t a = arrays2support[i];
                                                                                                                                            +
                                                                                                                                            1332 
                                                                                                                                            +
                                                                                                                                            1333  // Generating a random
                                                                                                                                            +
                                                                                                                                            1334  std::uniform_real_distribution<> urand(0, 1);
                                                                                                                                            +
                                                                                                                                            1335  double r = urand(*rengine);
                                                                                                                                            +
                                                                                                                                            1336  double cumprob = 0.0;
                                                                                                                                            +
                                                                                                                                            1337 
                                                                                                                                            +
                                                                                                                                            1338  size_t k = params.size();
                                                                                                                                            +
                                                                                                                                            1339 
                                                                                                                                            +
                                                                                                                                            1340  // Sampling an array
                                                                                                                                            +
                                                                                                                                            1341  size_t j = 0u;
                                                                                                                                            +
                                                                                                                                            1342  std::vector< double > & probs = pset_probs[a];
                                                                                                                                            +
                                                                                                                                            1343  if ((probs.size() > 0u) && (vec_equal_approx(params, params_last[a])))
                                                                                                                                            +
                                                                                                                                            1344  // If precomputed, then no need to recalc support
                                                                                                                                            +
                                                                                                                                            1345  {
                                                                                                                                            +
                                                                                                                                            1346 
                                                                                                                                            +
                                                                                                                                            1347  while (cumprob < r)
                                                                                                                                            +
                                                                                                                                            1348  cumprob += probs[j++];
                                                                                                                                            1349 
                                                                                                                                            -
                                                                                                                                            1350  size_t k = params.size();
                                                                                                                                            -
                                                                                                                                            1351 
                                                                                                                                            -
                                                                                                                                            1352  // Sampling an array
                                                                                                                                            -
                                                                                                                                            1353  size_t j = 0u;
                                                                                                                                            -
                                                                                                                                            1354  std::vector< double > & probs = pset_probs[a];
                                                                                                                                            -
                                                                                                                                            1355  if ((probs.size() > 0u) && (vec_equal_approx(params, params_last[a])))
                                                                                                                                            -
                                                                                                                                            1356  // If precomputed, then no need to recalc support
                                                                                                                                            -
                                                                                                                                            1357  {
                                                                                                                                            +
                                                                                                                                            1350  if (j > 0u)
                                                                                                                                            +
                                                                                                                                            1351  j--;
                                                                                                                                            +
                                                                                                                                            1352 
                                                                                                                                            +
                                                                                                                                            1353  } else {
                                                                                                                                            +
                                                                                                                                            1354 
                                                                                                                                            +
                                                                                                                                            1355  probs.resize(pset_arrays[a].size());
                                                                                                                                            +
                                                                                                                                            1356  std::vector< double > temp_stats(params.size());
                                                                                                                                            +
                                                                                                                                            1357  const std::vector< double > & stats = pset_stats[a];
                                                                                                                                            1358 
                                                                                                                                            -
                                                                                                                                            1359  while (cumprob < r)
                                                                                                                                            -
                                                                                                                                            1360  cumprob += probs[j++];
                                                                                                                                            -
                                                                                                                                            1361 
                                                                                                                                            -
                                                                                                                                            1362  if (j > 0u)
                                                                                                                                            -
                                                                                                                                            1363  j--;
                                                                                                                                            -
                                                                                                                                            1364 
                                                                                                                                            -
                                                                                                                                            1365  } else {
                                                                                                                                            -
                                                                                                                                            1366 
                                                                                                                                            -
                                                                                                                                            1367  probs.resize(pset_arrays[a].size());
                                                                                                                                            -
                                                                                                                                            1368  std::vector< double > temp_stats(params.size());
                                                                                                                                            -
                                                                                                                                            1369  const std::vector< double > & stats = pset_stats[a];
                                                                                                                                            -
                                                                                                                                            1370 
                                                                                                                                            -
                                                                                                                                            1371  int i_matches = -1;
                                                                                                                                            -
                                                                                                                                            1372  for (size_t array = 0u; array < probs.size(); ++array)
                                                                                                                                            -
                                                                                                                                            1373  {
                                                                                                                                            -
                                                                                                                                            1374 
                                                                                                                                            -
                                                                                                                                            1375  // Filling out the parameters
                                                                                                                                            -
                                                                                                                                            1376  for (auto p = 0u; p < params.size(); ++p)
                                                                                                                                            -
                                                                                                                                            1377  temp_stats[p] = stats[array * k + p];
                                                                                                                                            -
                                                                                                                                            1378 
                                                                                                                                            -
                                                                                                                                            1379  probs[array] = this->likelihood(params, temp_stats, i, false);
                                                                                                                                            -
                                                                                                                                            1380  cumprob += probs[array];
                                                                                                                                            -
                                                                                                                                            1381 
                                                                                                                                            -
                                                                                                                                            1382  if (i_matches == -1 && cumprob >= r)
                                                                                                                                            -
                                                                                                                                            1383  i_matches = array;
                                                                                                                                            -
                                                                                                                                            1384  }
                                                                                                                                            -
                                                                                                                                            1385 
                                                                                                                                            -
                                                                                                                                            1386  #ifdef BARRY_DEBUG
                                                                                                                                            -
                                                                                                                                            1387  if (i_matches < 0)
                                                                                                                                            -
                                                                                                                                            1388  throw std::logic_error(
                                                                                                                                            -
                                                                                                                                            1389  std::string(
                                                                                                                                            -
                                                                                                                                            1390  "Something went wrong when sampling from a different set of.") +
                                                                                                                                            -
                                                                                                                                            1391  std::string("parameters. Please report this bug: ") +
                                                                                                                                            -
                                                                                                                                            1392  std::string(" cumprob: ") + std::to_string(cumprob) +
                                                                                                                                            -
                                                                                                                                            1393  std::string(" r: ") + std::to_string(r)
                                                                                                                                            -
                                                                                                                                            1394  );
                                                                                                                                            -
                                                                                                                                            1395  #endif
                                                                                                                                            -
                                                                                                                                            1396 
                                                                                                                                            -
                                                                                                                                            1397  j = i_matches;
                                                                                                                                            -
                                                                                                                                            1398 
                                                                                                                                            -
                                                                                                                                            1399  }
                                                                                                                                            -
                                                                                                                                            1400 
                                                                                                                                            -
                                                                                                                                            1401 
                                                                                                                                            -
                                                                                                                                            1402  #ifdef BARRY_DEBUG
                                                                                                                                            -
                                                                                                                                            1403  return this->pset_arrays.at(a).at(j);
                                                                                                                                            -
                                                                                                                                            1404  #else
                                                                                                                                            -
                                                                                                                                            1405  return this->pset_arrays[a][j];
                                                                                                                                            -
                                                                                                                                            1406  #endif
                                                                                                                                            -
                                                                                                                                            1407 
                                                                                                                                            -
                                                                                                                                            1408 }
                                                                                                                                            -
                                                                                                                                            1409 
                                                                                                                                            -
                                                                                                                                            1410 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1412  const Array_Type & Array_,
                                                                                                                                            -
                                                                                                                                            1413  const std::vector< double > & params,
                                                                                                                                            -
                                                                                                                                            1414  size_t i,
                                                                                                                                            -
                                                                                                                                            1415  size_t j
                                                                                                                                            -
                                                                                                                                            1416 ) {
                                                                                                                                            +
                                                                                                                                            1359  int i_matches = -1;
                                                                                                                                            +
                                                                                                                                            1360  for (size_t array = 0u; array < probs.size(); ++array)
                                                                                                                                            +
                                                                                                                                            1361  {
                                                                                                                                            +
                                                                                                                                            1362 
                                                                                                                                            +
                                                                                                                                            1363  // Filling out the parameters
                                                                                                                                            +
                                                                                                                                            1364  for (auto p = 0u; p < params.size(); ++p)
                                                                                                                                            +
                                                                                                                                            1365  temp_stats[p] = stats[array * k + p];
                                                                                                                                            +
                                                                                                                                            1366 
                                                                                                                                            +
                                                                                                                                            1367  probs[array] = this->likelihood(params, temp_stats, i, false);
                                                                                                                                            +
                                                                                                                                            1368  cumprob += probs[array];
                                                                                                                                            +
                                                                                                                                            1369 
                                                                                                                                            +
                                                                                                                                            1370  if (i_matches == -1 && cumprob >= r)
                                                                                                                                            +
                                                                                                                                            1371  i_matches = array;
                                                                                                                                            +
                                                                                                                                            1372  }
                                                                                                                                            +
                                                                                                                                            1373 
                                                                                                                                            +
                                                                                                                                            1374  #ifdef BARRY_DEBUG
                                                                                                                                            +
                                                                                                                                            1375  if (i_matches < 0)
                                                                                                                                            +
                                                                                                                                            1376  throw std::logic_error(
                                                                                                                                            +
                                                                                                                                            1377  std::string(
                                                                                                                                            +
                                                                                                                                            1378  "Something went wrong when sampling from a different set of.") +
                                                                                                                                            +
                                                                                                                                            1379  std::string("parameters. Please report this bug: ") +
                                                                                                                                            +
                                                                                                                                            1380  std::string(" cumprob: ") + std::to_string(cumprob) +
                                                                                                                                            +
                                                                                                                                            1381  std::string(" r: ") + std::to_string(r)
                                                                                                                                            +
                                                                                                                                            1382  );
                                                                                                                                            +
                                                                                                                                            1383  #endif
                                                                                                                                            +
                                                                                                                                            1384 
                                                                                                                                            +
                                                                                                                                            1385  j = i_matches;
                                                                                                                                            +
                                                                                                                                            1386 
                                                                                                                                            +
                                                                                                                                            1387  }
                                                                                                                                            +
                                                                                                                                            1388 
                                                                                                                                            +
                                                                                                                                            1389 
                                                                                                                                            +
                                                                                                                                            1390  #ifdef BARRY_DEBUG
                                                                                                                                            +
                                                                                                                                            1391  return this->pset_arrays.at(a).at(j);
                                                                                                                                            +
                                                                                                                                            1392  #else
                                                                                                                                            +
                                                                                                                                            1393  return this->pset_arrays[a][j];
                                                                                                                                            +
                                                                                                                                            1394  #endif
                                                                                                                                            +
                                                                                                                                            1395 
                                                                                                                                            +
                                                                                                                                            1396 }
                                                                                                                                            +
                                                                                                                                            1397 
                                                                                                                                            +
                                                                                                                                            1398 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1400  const Array_Type & Array_,
                                                                                                                                            +
                                                                                                                                            1401  const std::vector< double > & params,
                                                                                                                                            +
                                                                                                                                            1402  size_t i,
                                                                                                                                            +
                                                                                                                                            1403  size_t j
                                                                                                                                            +
                                                                                                                                            1404 ) {
                                                                                                                                            +
                                                                                                                                            1405 
                                                                                                                                            +
                                                                                                                                            1406  // Generating a copy of the array so we can update
                                                                                                                                            +
                                                                                                                                            1407  Array_Type A(Array_, true);
                                                                                                                                            +
                                                                                                                                            1408 
                                                                                                                                            +
                                                                                                                                            1409  // Making sure we add it first
                                                                                                                                            +
                                                                                                                                            1410  A.insert_cell(i, j, A.default_val(), true, false);
                                                                                                                                            +
                                                                                                                                            1411 
                                                                                                                                            +
                                                                                                                                            1412  // Computing the change stats_target
                                                                                                                                            +
                                                                                                                                            1413  std::vector< double > tmp_counts;
                                                                                                                                            +
                                                                                                                                            1414  tmp_counts.reserve(counters->size());
                                                                                                                                            +
                                                                                                                                            1415  for (size_t ii = 0u; ii < counters->size(); ++ii)
                                                                                                                                            +
                                                                                                                                            1416  tmp_counts.push_back(counters->operator[](ii).count(A, i, j));
                                                                                                                                            1417 
                                                                                                                                            -
                                                                                                                                            1418  // Generating a copy of the array so we can update
                                                                                                                                            -
                                                                                                                                            1419  Array_Type A(Array_, true);
                                                                                                                                            -
                                                                                                                                            1420 
                                                                                                                                            -
                                                                                                                                            1421  // Making sure we add it first
                                                                                                                                            -
                                                                                                                                            1422  A.insert_cell(i, j, A.default_val(), true, false);
                                                                                                                                            -
                                                                                                                                            1423 
                                                                                                                                            -
                                                                                                                                            1424  // Computing the change stats_target
                                                                                                                                            -
                                                                                                                                            1425  std::vector< double > tmp_counts;
                                                                                                                                            -
                                                                                                                                            1426  tmp_counts.reserve(counters->size());
                                                                                                                                            -
                                                                                                                                            1427  for (size_t ii = 0u; ii < counters->size(); ++ii)
                                                                                                                                            -
                                                                                                                                            1428  tmp_counts.push_back(counters->operator[](ii).count(A, i, j));
                                                                                                                                            -
                                                                                                                                            1429 
                                                                                                                                            -
                                                                                                                                            1430  // If there is a transformation function, it needs to be
                                                                                                                                            -
                                                                                                                                            1431  // applied before dealing with the likelihood.
                                                                                                                                            -
                                                                                                                                            1432  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            1433  tmp_counts = transform_model_fun(&tmp_counts[0u], tmp_counts.size());
                                                                                                                                            -
                                                                                                                                            1434 
                                                                                                                                            -
                                                                                                                                            1435  return 1.0/
                                                                                                                                            -
                                                                                                                                            1436  (1.0 + std::exp(-vec_inner_prod<double>(
                                                                                                                                            -
                                                                                                                                            1437  &params[0u], &tmp_counts[0u], params.size()
                                                                                                                                            -
                                                                                                                                            1438  )));
                                                                                                                                            -
                                                                                                                                            1439 
                                                                                                                                            -
                                                                                                                                            1440 
                                                                                                                                            -
                                                                                                                                            1441 }
                                                                                                                                            -
                                                                                                                                            1442 
                                                                                                                                            -
                                                                                                                                            1443 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1445  return this->rengine;
                                                                                                                                            -
                                                                                                                                            1446 }
                                                                                                                                            -
                                                                                                                                            1447 
                                                                                                                                            -
                                                                                                                                            1448 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1450  return this->counters;
                                                                                                                                            -
                                                                                                                                            1451 }
                                                                                                                                            -
                                                                                                                                            1452 
                                                                                                                                            -
                                                                                                                                            1453 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1455  return this->rules;
                                                                                                                                            -
                                                                                                                                            1456 }
                                                                                                                                            -
                                                                                                                                            1457 
                                                                                                                                            -
                                                                                                                                            1458 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1460  return this->rules_dyn;
                                                                                                                                            +
                                                                                                                                            1418  // If there is a transformation function, it needs to be
                                                                                                                                            +
                                                                                                                                            1419  // applied before dealing with the likelihood.
                                                                                                                                            +
                                                                                                                                            1420  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            1421  tmp_counts = transform_model_fun(&tmp_counts[0u], tmp_counts.size());
                                                                                                                                            +
                                                                                                                                            1422 
                                                                                                                                            +
                                                                                                                                            1423  return 1.0/
                                                                                                                                            +
                                                                                                                                            1424  (1.0 + std::exp(-vec_inner_prod<double>(
                                                                                                                                            +
                                                                                                                                            1425  &params[0u], &tmp_counts[0u], params.size()
                                                                                                                                            +
                                                                                                                                            1426  )));
                                                                                                                                            +
                                                                                                                                            1427 
                                                                                                                                            +
                                                                                                                                            1428 
                                                                                                                                            +
                                                                                                                                            1429 }
                                                                                                                                            +
                                                                                                                                            1430 
                                                                                                                                            +
                                                                                                                                            1431 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1433  return this->rengine;
                                                                                                                                            +
                                                                                                                                            1434 }
                                                                                                                                            +
                                                                                                                                            1435 
                                                                                                                                            +
                                                                                                                                            1436 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1438  return this->counters;
                                                                                                                                            +
                                                                                                                                            1439 }
                                                                                                                                            +
                                                                                                                                            1440 
                                                                                                                                            +
                                                                                                                                            1441 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1443  return this->rules;
                                                                                                                                            +
                                                                                                                                            1444 }
                                                                                                                                            +
                                                                                                                                            1445 
                                                                                                                                            +
                                                                                                                                            1446 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1448  return this->rules_dyn;
                                                                                                                                            +
                                                                                                                                            1449 }
                                                                                                                                            +
                                                                                                                                            1450 
                                                                                                                                            +
                                                                                                                                            1451 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            1454  return &this->support_fun;
                                                                                                                                            +
                                                                                                                                            1455 }
                                                                                                                                            +
                                                                                                                                            1456 
                                                                                                                                            +
                                                                                                                                            1457 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            1459 {
                                                                                                                                            +
                                                                                                                                            1460  return &stats_target;
                                                                                                                                            1461 }
                                                                                                                                            1462 
                                                                                                                                            1463 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            1466  return &this->support_fun;
                                                                                                                                            -
                                                                                                                                            1467 }
                                                                                                                                            -
                                                                                                                                            1468 
                                                                                                                                            -
                                                                                                                                            1469 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1471 {
                                                                                                                                            -
                                                                                                                                            1472  return &stats_target;
                                                                                                                                            -
                                                                                                                                            1473 }
                                                                                                                                            -
                                                                                                                                            1474 
                                                                                                                                            -
                                                                                                                                            1475 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1477 {
                                                                                                                                            -
                                                                                                                                            1478  return &stats_support;
                                                                                                                                            -
                                                                                                                                            1479 }
                                                                                                                                            -
                                                                                                                                            1480 
                                                                                                                                            -
                                                                                                                                            1481 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1483 {
                                                                                                                                            -
                                                                                                                                            1484  return &arrays2support;
                                                                                                                                            -
                                                                                                                                            1485 }
                                                                                                                                            -
                                                                                                                                            1486 
                                                                                                                                            -
                                                                                                                                            1487 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1489  return &pset_arrays;
                                                                                                                                            -
                                                                                                                                            1490 }
                                                                                                                                            -
                                                                                                                                            1491 
                                                                                                                                            -
                                                                                                                                            1492 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1494  return &pset_stats;
                                                                                                                                            -
                                                                                                                                            1495 }
                                                                                                                                            -
                                                                                                                                            1496 
                                                                                                                                            -
                                                                                                                                            1497 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1499  return &pset_probs;
                                                                                                                                            -
                                                                                                                                            1500 }
                                                                                                                                            -
                                                                                                                                            1501 
                                                                                                                                            -
                                                                                                                                            1502 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            1504  std::function<std::vector<double>(double *,size_t)> fun,
                                                                                                                                            -
                                                                                                                                            1505  std::vector< std::string > names
                                                                                                                                            -
                                                                                                                                            1506  )
                                                                                                                                            -
                                                                                                                                            1507 {
                                                                                                                                            +
                                                                                                                                            1464 inline std::vector< std::vector< double > > *
                                                                                                                                            + +
                                                                                                                                            1466 {
                                                                                                                                            +
                                                                                                                                            1467  return &stats_support;
                                                                                                                                            +
                                                                                                                                            1468 }
                                                                                                                                            +
                                                                                                                                            1469 
                                                                                                                                            +
                                                                                                                                            1470 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            1471 inline std::vector< size_t > *
                                                                                                                                            + +
                                                                                                                                            1473 {
                                                                                                                                            +
                                                                                                                                            1474  return &arrays2support;
                                                                                                                                            +
                                                                                                                                            1475 }
                                                                                                                                            +
                                                                                                                                            1476 
                                                                                                                                            +
                                                                                                                                            1477 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            1478 inline std::vector< std::vector< Array_Type > > *
                                                                                                                                            + +
                                                                                                                                            1480  return &pset_arrays;
                                                                                                                                            +
                                                                                                                                            1481 }
                                                                                                                                            +
                                                                                                                                            1482 
                                                                                                                                            +
                                                                                                                                            1483 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            1484 inline std::vector< std::vector<double> > *
                                                                                                                                            + +
                                                                                                                                            1486  return &pset_stats;
                                                                                                                                            +
                                                                                                                                            1487 }
                                                                                                                                            +
                                                                                                                                            1488 
                                                                                                                                            +
                                                                                                                                            1489 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            1490 inline std::vector< std::vector<double> > *
                                                                                                                                            + +
                                                                                                                                            1492  return &pset_probs;
                                                                                                                                            +
                                                                                                                                            1493 }
                                                                                                                                            +
                                                                                                                                            1494 
                                                                                                                                            +
                                                                                                                                            1495 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            1496 inline void
                                                                                                                                            + +
                                                                                                                                            1498  std::function<std::vector<double>(double *,size_t)> fun,
                                                                                                                                            +
                                                                                                                                            1499  std::vector< std::string > names
                                                                                                                                            +
                                                                                                                                            1500  )
                                                                                                                                            +
                                                                                                                                            1501 {
                                                                                                                                            +
                                                                                                                                            1502 
                                                                                                                                            +
                                                                                                                                            1503  if (transform_model_fun)
                                                                                                                                            +
                                                                                                                                            1504  throw std::logic_error("A transformation function for the model has already been established.");
                                                                                                                                            +
                                                                                                                                            1505 
                                                                                                                                            +
                                                                                                                                            1506  transform_model_fun = fun;
                                                                                                                                            +
                                                                                                                                            1507  transform_model_term_names = names;
                                                                                                                                            1508 
                                                                                                                                            -
                                                                                                                                            1509  if (transform_model_fun)
                                                                                                                                            -
                                                                                                                                            1510  throw std::logic_error("A transformation function for the model has already been established.");
                                                                                                                                            -
                                                                                                                                            1511 
                                                                                                                                            -
                                                                                                                                            1512  transform_model_fun = fun;
                                                                                                                                            -
                                                                                                                                            1513  transform_model_term_names = names;
                                                                                                                                            +
                                                                                                                                            1509  size_t k = counters->size();
                                                                                                                                            +
                                                                                                                                            1510 
                                                                                                                                            +
                                                                                                                                            1511  // Applying over the support
                                                                                                                                            +
                                                                                                                                            1512  for (auto & s : stats_support)
                                                                                                                                            +
                                                                                                                                            1513  {
                                                                                                                                            1514 
                                                                                                                                            -
                                                                                                                                            1515  size_t k = counters->size();
                                                                                                                                            -
                                                                                                                                            1516 
                                                                                                                                            -
                                                                                                                                            1517  // Applying over the support
                                                                                                                                            -
                                                                                                                                            1518  for (auto & s : stats_support)
                                                                                                                                            -
                                                                                                                                            1519  {
                                                                                                                                            +
                                                                                                                                            1515  // Making room for the new support
                                                                                                                                            +
                                                                                                                                            1516  std::vector< double > s_new(0u);
                                                                                                                                            +
                                                                                                                                            1517  s_new.reserve(s.size());
                                                                                                                                            +
                                                                                                                                            1518 
                                                                                                                                            +
                                                                                                                                            1519  size_t n = s.size() / (k + 1u);
                                                                                                                                            1520 
                                                                                                                                            -
                                                                                                                                            1521  // Making room for the new support
                                                                                                                                            -
                                                                                                                                            1522  std::vector< double > s_new(0u);
                                                                                                                                            -
                                                                                                                                            1523  s_new.reserve(s.size());
                                                                                                                                            +
                                                                                                                                            1521  // Iterating through the unique sets
                                                                                                                                            +
                                                                                                                                            1522  for (size_t i = 0; i < n; ++i)
                                                                                                                                            +
                                                                                                                                            1523  {
                                                                                                                                            1524 
                                                                                                                                            -
                                                                                                                                            1525  size_t n = s.size() / (k + 1u);
                                                                                                                                            -
                                                                                                                                            1526 
                                                                                                                                            -
                                                                                                                                            1527  // Iterating through the unique sets
                                                                                                                                            -
                                                                                                                                            1528  for (size_t i = 0; i < n; ++i)
                                                                                                                                            -
                                                                                                                                            1529  {
                                                                                                                                            +
                                                                                                                                            1525  // Appending size
                                                                                                                                            +
                                                                                                                                            1526  s_new.push_back(s[i * (k + 1u)]);
                                                                                                                                            +
                                                                                                                                            1527 
                                                                                                                                            +
                                                                                                                                            1528  // Applying transformation and adding to the new set
                                                                                                                                            +
                                                                                                                                            1529  auto res = transform_model_fun(&s[i * (k + 1u) + 1u], k);
                                                                                                                                            1530 
                                                                                                                                            -
                                                                                                                                            1531  // Appending size
                                                                                                                                            -
                                                                                                                                            1532  s_new.push_back(s[i * (k + 1u)]);
                                                                                                                                            +
                                                                                                                                            1531  if (res.size() != transform_model_term_names.size())
                                                                                                                                            +
                                                                                                                                            1532  throw std::length_error("The transform vector from -transform_model_fun- does not match the size of -transform_model_term_names-.");
                                                                                                                                            1533 
                                                                                                                                            -
                                                                                                                                            1534  // Applying transformation and adding to the new set
                                                                                                                                            -
                                                                                                                                            1535  auto res = transform_model_fun(&s[i * (k + 1u) + 1u], k);
                                                                                                                                            -
                                                                                                                                            1536 
                                                                                                                                            -
                                                                                                                                            1537  if (res.size() != transform_model_term_names.size())
                                                                                                                                            -
                                                                                                                                            1538  throw std::length_error("The transform vector from -transform_model_fun- does not match the size of -transform_model_term_names-.");
                                                                                                                                            -
                                                                                                                                            1539 
                                                                                                                                            -
                                                                                                                                            1540  std::copy(res.begin(), res.end(), std::back_inserter(s_new));
                                                                                                                                            -
                                                                                                                                            1541 
                                                                                                                                            -
                                                                                                                                            1542  }
                                                                                                                                            -
                                                                                                                                            1543 
                                                                                                                                            -
                                                                                                                                            1544  // Exchanging with the original
                                                                                                                                            -
                                                                                                                                            1545  std::swap(s, s_new);
                                                                                                                                            +
                                                                                                                                            1534  std::copy(res.begin(), res.end(), std::back_inserter(s_new));
                                                                                                                                            +
                                                                                                                                            1535 
                                                                                                                                            +
                                                                                                                                            1536  }
                                                                                                                                            +
                                                                                                                                            1537 
                                                                                                                                            +
                                                                                                                                            1538  // Exchanging with the original
                                                                                                                                            +
                                                                                                                                            1539  std::swap(s, s_new);
                                                                                                                                            +
                                                                                                                                            1540 
                                                                                                                                            +
                                                                                                                                            1541  }
                                                                                                                                            +
                                                                                                                                            1542 
                                                                                                                                            +
                                                                                                                                            1543  // Applying over the target statistics
                                                                                                                                            +
                                                                                                                                            1544  for (auto & s : stats_target)
                                                                                                                                            +
                                                                                                                                            1545  s = transform_model_fun(&s[0u], k);
                                                                                                                                            1546 
                                                                                                                                            -
                                                                                                                                            1547  }
                                                                                                                                            -
                                                                                                                                            1548 
                                                                                                                                            -
                                                                                                                                            1549  // Applying over the target statistics
                                                                                                                                            -
                                                                                                                                            1550  for (auto & s : stats_target)
                                                                                                                                            -
                                                                                                                                            1551  s = transform_model_fun(&s[0u], k);
                                                                                                                                            -
                                                                                                                                            1552 
                                                                                                                                            -
                                                                                                                                            1553  // Checking if there is support included
                                                                                                                                            -
                                                                                                                                            1554  if (with_pset)
                                                                                                                                            -
                                                                                                                                            1555  {
                                                                                                                                            -
                                                                                                                                            1556 
                                                                                                                                            -
                                                                                                                                            1557  // Applying it to the support
                                                                                                                                            -
                                                                                                                                            1558  for (auto s = 0u; s < pset_arrays.size(); ++s)
                                                                                                                                            -
                                                                                                                                            1559  {
                                                                                                                                            -
                                                                                                                                            1560  std::vector< double > new_stats;
                                                                                                                                            -
                                                                                                                                            1561 
                                                                                                                                            -
                                                                                                                                            1562  for (auto a = 0u; a < pset_arrays[s].size(); ++a)
                                                                                                                                            -
                                                                                                                                            1563  {
                                                                                                                                            -
                                                                                                                                            1564  // Computing the transformed version of the data
                                                                                                                                            -
                                                                                                                                            1565  auto tmpstats = transform_model_fun(
                                                                                                                                            -
                                                                                                                                            1566  &pset_stats[s][a * k], k
                                                                                                                                            -
                                                                                                                                            1567  );
                                                                                                                                            -
                                                                                                                                            1568 
                                                                                                                                            -
                                                                                                                                            1569  // Storing the new values
                                                                                                                                            -
                                                                                                                                            1570  for (auto p = 0u; p < k; ++p)
                                                                                                                                            -
                                                                                                                                            1571  new_stats.push_back(tmpstats[p]);
                                                                                                                                            -
                                                                                                                                            1572  }
                                                                                                                                            -
                                                                                                                                            1573 
                                                                                                                                            -
                                                                                                                                            1574  // Updating the dataset
                                                                                                                                            -
                                                                                                                                            1575  std::swap(pset_stats[s], new_stats);
                                                                                                                                            -
                                                                                                                                            1576 
                                                                                                                                            -
                                                                                                                                            1577  }
                                                                                                                                            +
                                                                                                                                            1547  // Checking if there is support included
                                                                                                                                            +
                                                                                                                                            1548  if (with_pset)
                                                                                                                                            +
                                                                                                                                            1549  {
                                                                                                                                            +
                                                                                                                                            1550 
                                                                                                                                            +
                                                                                                                                            1551  // Applying it to the support
                                                                                                                                            +
                                                                                                                                            1552  for (auto s = 0u; s < pset_arrays.size(); ++s)
                                                                                                                                            +
                                                                                                                                            1553  {
                                                                                                                                            +
                                                                                                                                            1554  std::vector< double > new_stats;
                                                                                                                                            +
                                                                                                                                            1555 
                                                                                                                                            +
                                                                                                                                            1556  for (auto a = 0u; a < pset_arrays[s].size(); ++a)
                                                                                                                                            +
                                                                                                                                            1557  {
                                                                                                                                            +
                                                                                                                                            1558  // Computing the transformed version of the data
                                                                                                                                            +
                                                                                                                                            1559  auto tmpstats = transform_model_fun(
                                                                                                                                            +
                                                                                                                                            1560  &pset_stats[s][a * k], k
                                                                                                                                            +
                                                                                                                                            1561  );
                                                                                                                                            +
                                                                                                                                            1562 
                                                                                                                                            +
                                                                                                                                            1563  // Storing the new values
                                                                                                                                            +
                                                                                                                                            1564  for (auto p = 0u; p < k; ++p)
                                                                                                                                            +
                                                                                                                                            1565  new_stats.push_back(tmpstats[p]);
                                                                                                                                            +
                                                                                                                                            1566  }
                                                                                                                                            +
                                                                                                                                            1567 
                                                                                                                                            +
                                                                                                                                            1568  // Updating the dataset
                                                                                                                                            +
                                                                                                                                            1569  std::swap(pset_stats[s], new_stats);
                                                                                                                                            +
                                                                                                                                            1570 
                                                                                                                                            +
                                                                                                                                            1571  }
                                                                                                                                            +
                                                                                                                                            1572 
                                                                                                                                            +
                                                                                                                                            1573  }
                                                                                                                                            +
                                                                                                                                            1574 
                                                                                                                                            +
                                                                                                                                            1575  // And, resizing the last set of parameters
                                                                                                                                            +
                                                                                                                                            1576  for (auto & p : params_last)
                                                                                                                                            +
                                                                                                                                            1577  p.resize(transform_model_term_names.size());
                                                                                                                                            1578 
                                                                                                                                            -
                                                                                                                                            1579  }
                                                                                                                                            +
                                                                                                                                            1579  return;
                                                                                                                                            1580 
                                                                                                                                            -
                                                                                                                                            1581  // And, resizing the last set of parameters
                                                                                                                                            -
                                                                                                                                            1582  for (auto & p : params_last)
                                                                                                                                            -
                                                                                                                                            1583  p.resize(transform_model_term_names.size());
                                                                                                                                            -
                                                                                                                                            1584 
                                                                                                                                            -
                                                                                                                                            1585  return;
                                                                                                                                            +
                                                                                                                                            1581 }
                                                                                                                                            +
                                                                                                                                            1582 
                                                                                                                                            +
                                                                                                                                            1583 #undef MODEL_TEMPLATE
                                                                                                                                            +
                                                                                                                                            1584 #undef MODEL_TEMPLATE_ARGS
                                                                                                                                            +
                                                                                                                                            1585 #undef MODEL_TYPE
                                                                                                                                            1586 
                                                                                                                                            -
                                                                                                                                            1587 }
                                                                                                                                            -
                                                                                                                                            1588 
                                                                                                                                            -
                                                                                                                                            1589 #undef MODEL_TEMPLATE
                                                                                                                                            -
                                                                                                                                            1590 #undef MODEL_TEMPLATE_ARGS
                                                                                                                                            -
                                                                                                                                            1591 #undef MODEL_TYPE
                                                                                                                                            -
                                                                                                                                            1592 
                                                                                                                                            -
                                                                                                                                            1593 #endif
                                                                                                                                            +
                                                                                                                                            1587 #endif
                                                                                                                                            #define printf_barry
                                                                                                                                            #define BARRY_SAFE_EXP
                                                                                                                                            #define BARRY_NCORES_ARG(default)
                                                                                                                                            A counter function based on change statistics.
                                                                                                                                            Vector of counters.
                                                                                                                                            General framework for discrete exponential models. This class allows generating discrete exponential ...
                                                                                                                                            Definition: model-bones.hpp:34
                                                                                                                                            -
                                                                                                                                            size_t size_unique() const noexcept
                                                                                                                                            +
                                                                                                                                            size_t size_unique() const noexcept
                                                                                                                                            std::vector< std::string > transform_model_term_names
                                                                                                                                            -
                                                                                                                                            const std::mt19937 * get_rengine() const
                                                                                                                                            +
                                                                                                                                            const std::mt19937 * get_rengine() const
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * rules_dyn
                                                                                                                                            Definition: model-bones.hpp:93
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * rules
                                                                                                                                            Definition: model-bones.hpp:92
                                                                                                                                            StatsCounter< Array_Type, Data_Counter_Type > counter_fun
                                                                                                                                            Definition: model-bones.hpp:95
                                                                                                                                            -
                                                                                                                                            size_t size() const noexcept
                                                                                                                                            -
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > &counter)
                                                                                                                                            Definition: model-meat.hpp:367
                                                                                                                                            -
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            +
                                                                                                                                            size_t size() const noexcept
                                                                                                                                            +
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > &counter)
                                                                                                                                            Definition: model-meat.hpp:352
                                                                                                                                            +
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            std::vector< std::vector< double > > stats_target
                                                                                                                                            Target statistics of the model.
                                                                                                                                            Definition: model-bones.hpp:64
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_pset_probs()
                                                                                                                                            -
                                                                                                                                            Array_Type sample(const Array_Type &Array_, const std::vector< double > &params={})
                                                                                                                                            -
                                                                                                                                            void update_normalizing_constants(const std::vector< double > &params,)
                                                                                                                                            Computes the normalizing constant for a given set of parameters.
                                                                                                                                            Definition: model-meat.hpp:149
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_stats_support()
                                                                                                                                            -
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:450
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_pset_probs()
                                                                                                                                            +
                                                                                                                                            Array_Type sample(const Array_Type &Array_, const std::vector< double > &params={})
                                                                                                                                            +
                                                                                                                                            void update_normalizing_constants(const std::vector< double > &params,)
                                                                                                                                            Computes the normalizing constant for a given set of parameters.
                                                                                                                                            Definition: model-meat.hpp:134
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_stats_support()
                                                                                                                                            +
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:435
                                                                                                                                            std::vector< std::vector< double > > stats_support
                                                                                                                                            Sufficient statistics of the model (support)
                                                                                                                                            Definition: model-bones.hpp:62
                                                                                                                                            -
                                                                                                                                            void store_psets() noexcept
                                                                                                                                            Definition: model-meat.hpp:352
                                                                                                                                            -
                                                                                                                                            double conditional_prob(const Array_Type &Array_, const std::vector< double > &params, size_t i, size_t j)
                                                                                                                                            Conditional probability ("Gibbs sampler")
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_pset_stats()
                                                                                                                                            Statistics of the support(s)
                                                                                                                                            -
                                                                                                                                            Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > & operator=(const Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > &Model_)
                                                                                                                                            Definition: model-meat.hpp:302
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< double > > * get_stats_target()
                                                                                                                                            Raw pointers to the support and target statistics.
                                                                                                                                            -
                                                                                                                                            std::vector< std::vector< Array_Type > > * get_pset_arrays()
                                                                                                                                            -
                                                                                                                                            Support< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > * get_support_fun()
                                                                                                                                            -
                                                                                                                                            std::vector< double > gen_key(const Array_Type &Array_)
                                                                                                                                            Definition: model-meat.hpp:360
                                                                                                                                            +
                                                                                                                                            void store_psets() noexcept
                                                                                                                                            Definition: model-meat.hpp:337
                                                                                                                                            +
                                                                                                                                            double conditional_prob(const Array_Type &Array_, const std::vector< double > &params, size_t i, size_t j)
                                                                                                                                            Conditional probability ("Gibbs sampler")
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_pset_stats()
                                                                                                                                            Statistics of the support(s)
                                                                                                                                            +
                                                                                                                                            Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > & operator=(const Model< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > &Model_)
                                                                                                                                            Definition: model-meat.hpp:287
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< double > > * get_stats_target()
                                                                                                                                            Raw pointers to the support and target statistics.
                                                                                                                                            +
                                                                                                                                            std::vector< std::vector< Array_Type > > * get_pset_arrays()
                                                                                                                                            +
                                                                                                                                            Support< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > * get_support_fun()
                                                                                                                                            +
                                                                                                                                            std::vector< double > gen_key(const Array_Type &Array_)
                                                                                                                                            Definition: model-meat.hpp:345
                                                                                                                                            std::vector< size_t > arrays2support
                                                                                                                                            Definition: model-bones.hpp:65
                                                                                                                                            -
                                                                                                                                            size_t add_array(const Array_Type &Array_, bool force_new=false)
                                                                                                                                            Adds an array to the support of not already included.
                                                                                                                                            Definition: model-meat.hpp:491
                                                                                                                                            -
                                                                                                                                            void add_hasher(Hasher_fun_type< Array_Type, Data_Counter_Type > fun_)
                                                                                                                                            Definition: model-meat.hpp:411
                                                                                                                                            -
                                                                                                                                            std::vector< std::string > colnames() const
                                                                                                                                            -
                                                                                                                                            double likelihood(const std::vector< double > &params, const size_t &i, bool as_log=false, bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:627
                                                                                                                                            -
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:432
                                                                                                                                            +
                                                                                                                                            size_t add_array(const Array_Type &Array_, bool force_new=false)
                                                                                                                                            Adds an array to the support of not already included.
                                                                                                                                            Definition: model-meat.hpp:476
                                                                                                                                            +
                                                                                                                                            void add_hasher(Hasher_fun_type< Array_Type, Data_Counter_Type > fun_)
                                                                                                                                            Definition: model-meat.hpp:396
                                                                                                                                            +
                                                                                                                                            std::vector< std::string > colnames() const
                                                                                                                                            +
                                                                                                                                            double likelihood(const std::vector< double > &params, const size_t &i, bool as_log=false, bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:612
                                                                                                                                            +
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:417
                                                                                                                                            std::vector< std::vector< double > > pset_stats
                                                                                                                                            Statistics of the support(s)
                                                                                                                                            Definition: model-bones.hpp:82
                                                                                                                                            -
                                                                                                                                            size_t nrules() const noexcept
                                                                                                                                            +
                                                                                                                                            size_t nrules() const noexcept
                                                                                                                                            std::vector< size_t > stats_support_n_arrays
                                                                                                                                            Number of arrays included per support.
                                                                                                                                            Definition: model-bones.hpp:63
                                                                                                                                            -
                                                                                                                                            void print_stats(size_t i) const
                                                                                                                                            Definition: model-meat.hpp:998
                                                                                                                                            -
                                                                                                                                            size_t nterms() const noexcept
                                                                                                                                            -
                                                                                                                                            double likelihood_total(const std::vector< double > &params, bool as_log=false, BARRY_NCORES_ARG(=2), bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:888
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            -
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            Definition: model-meat.hpp:393
                                                                                                                                            -
                                                                                                                                            size_t support_size() const noexcept
                                                                                                                                            -
                                                                                                                                            size_t nrules_dyn() const noexcept
                                                                                                                                            +
                                                                                                                                            void print_stats(size_t i) const
                                                                                                                                            Definition: model-meat.hpp:985
                                                                                                                                            +
                                                                                                                                            size_t nterms() const noexcept
                                                                                                                                            +
                                                                                                                                            double likelihood_total(const std::vector< double > &params, bool as_log=false, BARRY_NCORES_ARG(=2), bool no_update_normconst=false)
                                                                                                                                            Definition: model-meat.hpp:873
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            +
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            Definition: model-meat.hpp:378
                                                                                                                                            +
                                                                                                                                            size_t support_size() const noexcept
                                                                                                                                            +
                                                                                                                                            size_t nrules_dyn() const noexcept
                                                                                                                                            std::vector< std::vector< double > > params_last
                                                                                                                                            Vector of the previously used parameters.
                                                                                                                                            Definition: model-bones.hpp:99
                                                                                                                                            -
                                                                                                                                            virtual void print() const
                                                                                                                                            Prints information about the model.
                                                                                                                                            +
                                                                                                                                            virtual void print() const
                                                                                                                                            Prints information about the model.
                                                                                                                                            Support< Array_Type, Data_Counter_Type, Data_Rule_Type, Data_Rule_Dyn_Type > support_fun
                                                                                                                                            Definition: model-bones.hpp:94
                                                                                                                                            -
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:474
                                                                                                                                            +
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            Definition: model-meat.hpp:459
                                                                                                                                            std::vector< std::vector< Array_Type > > pset_arrays
                                                                                                                                            Arrays of the support(s)
                                                                                                                                            Definition: model-bones.hpp:81
                                                                                                                                            std::function< std::vector< double >double *, size_t k)> transform_model_fun
                                                                                                                                            Transformation of the model.
                                                                                                                                            -
                                                                                                                                            std::vector< size_t > * get_arrays2support()
                                                                                                                                            +
                                                                                                                                            std::vector< size_t > * get_arrays2support()
                                                                                                                                            MapVec_type< double, size_t > keys2support
                                                                                                                                            Map of types of arrays to support sets.
                                                                                                                                            Definition: model-bones.hpp:72
                                                                                                                                            -
                                                                                                                                            std::vector< double > & get_normalizing_constants()
                                                                                                                                            Definition: model-meat.hpp:966
                                                                                                                                            - +
                                                                                                                                            std::vector< double > & get_normalizing_constants()
                                                                                                                                            Definition: model-meat.hpp:951
                                                                                                                                            +
                                                                                                                                            std::vector< double > normalizing_constants
                                                                                                                                            std::vector< bool > first_calc_done
                                                                                                                                            -
                                                                                                                                            void set_transform_model(std::function< std::vector< double >(double *, size_t)> fun, std::vector< std::string > names)
                                                                                                                                            Set the transform_model_fun object.
                                                                                                                                            +
                                                                                                                                            void set_transform_model(std::function< std::vector< double >(double *, size_t)> fun, std::vector< std::string > names)
                                                                                                                                            Set the transform_model_fun object.
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * counters
                                                                                                                                            Definition: model-bones.hpp:91
                                                                                                                                            -
                                                                                                                                            const std::vector< Array_Type > * get_pset(const size_t &i)
                                                                                                                                            Definition: model-meat.hpp:973
                                                                                                                                            -
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:422
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            +
                                                                                                                                            const std::vector< Array_Type > * get_pset(const size_t &i)
                                                                                                                                            Definition: model-meat.hpp:959
                                                                                                                                            +
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > &rule)
                                                                                                                                            Definition: model-meat.hpp:407
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            Rule for determining if a cell should be included in a sequence.
                                                                                                                                            Definition: rules-bones.hpp:20
                                                                                                                                            Vector of objects of class Rule.
                                                                                                                                            Definition: rules-bones.hpp:71
                                                                                                                                            Count stats for a single Array.
                                                                                                                                            @@ -1756,7 +1750,7 @@
                                                                                                                                            size_t i
                                                                                                                                            Data_Type &&counter_ noexcept
                                                                                                                                            Data_Type Counter_fun_type< Array_Type, Data_Type > Hasher_fun_type< Array_Type, Data_Type > Data_Type data_
                                                                                                                                            -
                                                                                                                                            double likelihood_(const double *stats_target, const std::vector< double > &params, const double normalizing_constant, size_t n_params, bool log_=false)
                                                                                                                                            Definition: model-meat.hpp:90
                                                                                                                                            +
                                                                                                                                            double likelihood_(const double *stats_target, const std::vector< double > &params, const double normalizing_constant, size_t n_params, bool log_=false)
                                                                                                                                            Definition: model-meat.hpp:71
                                                                                                                                            double update_normalizing_constant(const std::vector< double > &params, const double *support, size_t k, size_t n)
                                                                                                                                            Definition: model-meat.hpp:9
                                                                                                                                            Data_Type * counters_
                                                                                                                                            @@ -1772,7 +1766,7 @@ diff --git a/modules.html b/modules.html index b8b836e42..8deab3cb4 100644 --- a/modules.html +++ b/modules.html @@ -110,7 +110,7 @@ diff --git a/namespace_c_h_e_c_k.html b/namespace_c_h_e_c_k.html index ed3fde885..a047a214a 100644 --- a/namespace_c_h_e_c_k.html +++ b/namespace_c_h_e_c_k.html @@ -186,7 +186,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/namespace_e_x_i_s_t_s.html b/namespace_e_x_i_s_t_s.html index 4bd01f27f..68e4949fb 100644 --- a/namespace_e_x_i_s_t_s.html +++ b/namespace_e_x_i_s_t_s.html @@ -240,7 +240,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/namespacebarry.html b/namespacebarry.html index be599cade..cfb4c26ee 100644 --- a/namespacebarry.html +++ b/namespacebarry.html @@ -116,7 +116,7 @@ diff --git a/namespacebarry_1_1counters.html b/namespacebarry_1_1counters.html index e491ae5c6..7606c6aed 100644 --- a/namespacebarry_1_1counters.html +++ b/namespacebarry_1_1counters.html @@ -115,7 +115,7 @@ diff --git a/namespacebarry_1_1counters_1_1network.html b/namespacebarry_1_1counters_1_1network.html index 71da3544a..9720ddc21 100644 --- a/namespacebarry_1_1counters_1_1network.html +++ b/namespacebarry_1_1counters_1_1network.html @@ -102,7 +102,7 @@ diff --git a/namespacedefm.html b/namespacedefm.html index 7ee135d24..22aebbb9e 100644 --- a/namespacedefm.html +++ b/namespacedefm.html @@ -102,7 +102,7 @@ diff --git a/namespacegeese.html b/namespacegeese.html index 2e03cbc97..9ee566e4c 100644 --- a/namespacegeese.html +++ b/namespacegeese.html @@ -102,7 +102,7 @@ diff --git a/namespacemembers.html b/namespacemembers.html index 98df70792..142cf62b6 100644 --- a/namespacemembers.html +++ b/namespacemembers.html @@ -124,7 +124,7 @@ diff --git a/namespacemembers_vars.html b/namespacemembers_vars.html index 58f9c2a20..cd38ed30b 100644 --- a/namespacemembers_vars.html +++ b/namespacemembers_vars.html @@ -124,7 +124,7 @@ diff --git a/network-css_8hpp.html b/network-css_8hpp.html index 854f5e7d9..e6344e910 100644 --- a/network-css_8hpp.html +++ b/network-css_8hpp.html @@ -1259,7 +1259,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/network-css_8hpp_source.html b/network-css_8hpp_source.html index ef902420c..2825729f2 100644 --- a/network-css_8hpp_source.html +++ b/network-css_8hpp_source.html @@ -874,7 +874,7 @@ diff --git a/network_8hpp.html b/network_8hpp.html index c7919b376..2cb261d5f 100644 --- a/network_8hpp.html +++ b/network_8hpp.html @@ -682,7 +682,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/network_8hpp_source.html b/network_8hpp_source.html index ad30280c5..7a89c9607 100644 --- a/network_8hpp_source.html +++ b/network_8hpp_source.html @@ -1496,7 +1496,7 @@ diff --git a/powerset-bones_8hpp.html b/powerset-bones_8hpp.html index e8c6451d9..570e5753a 100644 --- a/powerset-bones_8hpp.html +++ b/powerset-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/powerset-bones_8hpp_source.html b/powerset-bones_8hpp_source.html index f4d78e734..c29d4081a 100644 --- a/powerset-bones_8hpp_source.html +++ b/powerset-bones_8hpp_source.html @@ -187,7 +187,7 @@ diff --git a/powerset-meat_8hpp.html b/powerset-meat_8hpp.html index b34380a14..72d83f431 100644 --- a/powerset-meat_8hpp.html +++ b/powerset-meat_8hpp.html @@ -113,7 +113,7 @@ diff --git a/powerset-meat_8hpp_source.html b/powerset-meat_8hpp_source.html index 49ea100d4..2109a7f5b 100644 --- a/powerset-meat_8hpp_source.html +++ b/powerset-meat_8hpp_source.html @@ -319,7 +319,7 @@ diff --git a/progress_8hpp.html b/progress_8hpp.html index 416e363d6..a0a738e40 100644 --- a/progress_8hpp.html +++ b/progress_8hpp.html @@ -146,7 +146,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/progress_8hpp_source.html b/progress_8hpp_source.html index 8147b0512..f490fdaea 100644 --- a/progress_8hpp_source.html +++ b/progress_8hpp_source.html @@ -164,7 +164,7 @@ diff --git a/rules-bones_8hpp.html b/rules-bones_8hpp.html index 64575adac..4f69a119f 100644 --- a/rules-bones_8hpp.html +++ b/rules-bones_8hpp.html @@ -177,7 +177,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/rules-bones_8hpp_source.html b/rules-bones_8hpp_source.html index 184a1722a..5d490d207 100644 --- a/rules-bones_8hpp_source.html +++ b/rules-bones_8hpp_source.html @@ -226,7 +226,7 @@ diff --git a/rules-meat_8hpp.html b/rules-meat_8hpp.html index 262828788..066b006ca 100644 --- a/rules-meat_8hpp.html +++ b/rules-meat_8hpp.html @@ -113,7 +113,7 @@ diff --git a/rules-meat_8hpp_source.html b/rules-meat_8hpp_source.html index c5ee3f953..e05685da0 100644 --- a/rules-meat_8hpp_source.html +++ b/rules-meat_8hpp_source.html @@ -318,7 +318,7 @@ diff --git a/statscounter-bones_8hpp.html b/statscounter-bones_8hpp.html index 781d249f1..aa8b42333 100644 --- a/statscounter-bones_8hpp.html +++ b/statscounter-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/statscounter-bones_8hpp_source.html b/statscounter-bones_8hpp_source.html index 6076a4996..8ae7a4ee7 100644 --- a/statscounter-bones_8hpp_source.html +++ b/statscounter-bones_8hpp_source.html @@ -188,7 +188,7 @@ diff --git a/statscounter-meat_8hpp.html b/statscounter-meat_8hpp.html index bb625b02b..945db9540 100644 --- a/statscounter-meat_8hpp.html +++ b/statscounter-meat_8hpp.html @@ -713,7 +713,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/statscounter-meat_8hpp_source.html b/statscounter-meat_8hpp_source.html index 82c30b6f7..1bdb37828 100644 --- a/statscounter-meat_8hpp_source.html +++ b/statscounter-meat_8hpp_source.html @@ -384,7 +384,7 @@ diff --git a/structvec_hasher-members.html b/structvec_hasher-members.html index 7e0675b4d..9643989eb 100644 --- a/structvec_hasher-members.html +++ b/structvec_hasher-members.html @@ -105,7 +105,7 @@ diff --git a/structvec_hasher.html b/structvec_hasher.html index a9df34550..da9819343 100644 --- a/structvec_hasher.html +++ b/structvec_hasher.html @@ -153,7 +153,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/support-bones_8hpp.html b/support-bones_8hpp.html index 537d9349f..61db85ad2 100644 --- a/support-bones_8hpp.html +++ b/support-bones_8hpp.html @@ -122,7 +122,7 @@ diff --git a/support-bones_8hpp_source.html b/support-bones_8hpp_source.html index 2b14d488e..e3d8bf6fc 100644 --- a/support-bones_8hpp_source.html +++ b/support-bones_8hpp_source.html @@ -241,32 +241,32 @@
                                                                                                                                            Rule for determining if a cell should be included in a sequence.
                                                                                                                                            Definition: rules-bones.hpp:20
                                                                                                                                            Vector of objects of class Rule.
                                                                                                                                            Definition: rules-bones.hpp:71
                                                                                                                                            Compute the support of sufficient statistics.
                                                                                                                                            -
                                                                                                                                            bool eval_rules_dyn(const std::vector< double > &counts, const size_t &i, const size_t &j)
                                                                                                                                            +
                                                                                                                                            bool eval_rules_dyn(const std::vector< double > &counts, const size_t &i, const size_t &j)
                                                                                                                                            bool delete_rules_dyn
                                                                                                                                            -
                                                                                                                                            void calc(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr, size_t max_num_elements_=0u)
                                                                                                                                            Computes the entire support.
                                                                                                                                            +
                                                                                                                                            void calc(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr, size_t max_num_elements_=0u)
                                                                                                                                            Computes the entire support.
                                                                                                                                            std::vector< double > current_stats
                                                                                                                                            size_t M
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            Vector of static rules (cells to iterate).
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            Vector of static rules (cells to iterate).
                                                                                                                                            Support(const Array_Type &Array_)
                                                                                                                                            Constructor passing a reference Array.
                                                                                                                                            -
                                                                                                                                            std::vector< double > get_counts() const
                                                                                                                                            +
                                                                                                                                            std::vector< double > get_counts() const
                                                                                                                                            Support(size_t N_, size_t M_)
                                                                                                                                            Constructor specifying the dimensions of the array (empty).
                                                                                                                                            size_t coordiantes_n_free
                                                                                                                                            size_t coordiantes_n_locked
                                                                                                                                            void init_support(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr)
                                                                                                                                            Definition: support-meat.hpp:5
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            Vector of dynamic rules (to include/exclude a realizaton).
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            Vector of dynamic rules (to include/exclude a realizaton).
                                                                                                                                            size_t n_counters
                                                                                                                                            std::vector< size_t > coordinates_free
                                                                                                                                            -
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > *f_)
                                                                                                                                            -
                                                                                                                                            void print() const
                                                                                                                                            +
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > *f_)
                                                                                                                                            +
                                                                                                                                            void print() const
                                                                                                                                            std::vector< bool > hashes_initialized
                                                                                                                                            -
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > *f_)
                                                                                                                                            +
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > *f_)
                                                                                                                                            std::vector< double > change_stats
                                                                                                                                            bool delete_counters
                                                                                                                                            -
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            -
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            Vector of couter functions.
                                                                                                                                            +
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            +
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            Vector of couter functions.
                                                                                                                                            size_t N
                                                                                                                                            -
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > f_)
                                                                                                                                            -
                                                                                                                                            const FreqTable< double > & get_data() const
                                                                                                                                            +
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > f_)
                                                                                                                                            +
                                                                                                                                            const FreqTable< double > & get_data() const
                                                                                                                                            void reset_array()
                                                                                                                                            std::vector< size_t > coordinates_locked
                                                                                                                                            @@ -274,9 +274,9 @@
                                                                                                                                            bool delete_rules
                                                                                                                                            std::vector< size_t > hashes
                                                                                                                                            -
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            -
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            -
                                                                                                                                            std::vector< double > * get_current_stats()
                                                                                                                                            List current statistics.
                                                                                                                                            +
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            +
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            +
                                                                                                                                            std::vector< double > * get_current_stats()
                                                                                                                                            List current statistics.
                                                                                                                                            size_t size_t j
                                                                                                                                            size_t i
                                                                                                                                            Data_Type * counters_
                                                                                                                                            @@ -289,7 +289,7 @@ diff --git a/support-meat_8hpp.html b/support-meat_8hpp.html index 21df65849..a2ce5d637 100644 --- a/support-meat_8hpp.html +++ b/support-meat_8hpp.html @@ -138,7 +138,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/support-meat_8hpp_source.html b/support-meat_8hpp_source.html index 046f876f0..e7b87420d 100644 --- a/support-meat_8hpp_source.html +++ b/support-meat_8hpp_source.html @@ -477,231 +477,232 @@
                                                                                                                                            379 }
                                                                                                                                            380 
                                                                                                                                            381 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            383  std::vector< Array_Type > * array_bank,
                                                                                                                                            -
                                                                                                                                            384  std::vector< double > * stats_bank,
                                                                                                                                            -
                                                                                                                                            385  size_t max_num_elements_
                                                                                                                                            -
                                                                                                                                            386 ) {
                                                                                                                                            -
                                                                                                                                            387 
                                                                                                                                            -
                                                                                                                                            388  if (max_num_elements_ != 0u)
                                                                                                                                            -
                                                                                                                                            389  this->max_num_elements = max_num_elements_;
                                                                                                                                            -
                                                                                                                                            390 
                                                                                                                                            -
                                                                                                                                            391  // Generating sequence
                                                                                                                                            -
                                                                                                                                            392  this->init_support(array_bank, stats_bank);
                                                                                                                                            -
                                                                                                                                            393 
                                                                                                                                            -
                                                                                                                                            394  // Recursive function to count
                                                                                                                                            -
                                                                                                                                            395  if (EmptyArray.is_dense())
                                                                                                                                            -
                                                                                                                                            396  calc_backend_dense(0u, array_bank, stats_bank);
                                                                                                                                            -
                                                                                                                                            397  else
                                                                                                                                            -
                                                                                                                                            398  calc_backend_sparse(0u, array_bank, stats_bank);
                                                                                                                                            -
                                                                                                                                            399 
                                                                                                                                            -
                                                                                                                                            400  change_stats.clear();
                                                                                                                                            -
                                                                                                                                            401 
                                                                                                                                            -
                                                                                                                                            402  if (max_num_elements_ != 0u)
                                                                                                                                            -
                                                                                                                                            403  this->max_num_elements = BARRY_MAX_NUM_ELEMENTS;
                                                                                                                                            -
                                                                                                                                            404 
                                                                                                                                            -
                                                                                                                                            405  if (this->data.size() == 0u)
                                                                                                                                            -
                                                                                                                                            406  {
                                                                                                                                            -
                                                                                                                                            407  throw std::logic_error("The array has support of size 0 (i.e., empty support). This could be a problem in the rules (constraints).\n");
                                                                                                                                            -
                                                                                                                                            408  }
                                                                                                                                            -
                                                                                                                                            409 
                                                                                                                                            +
                                                                                                                                            382 inline void
                                                                                                                                            + +
                                                                                                                                            384  std::vector< Array_Type > * array_bank,
                                                                                                                                            +
                                                                                                                                            385  std::vector< double > * stats_bank,
                                                                                                                                            +
                                                                                                                                            386  size_t max_num_elements_
                                                                                                                                            +
                                                                                                                                            387 ) {
                                                                                                                                            +
                                                                                                                                            388 
                                                                                                                                            +
                                                                                                                                            389  if (max_num_elements_ != 0u)
                                                                                                                                            +
                                                                                                                                            390  this->max_num_elements = max_num_elements_;
                                                                                                                                            +
                                                                                                                                            391 
                                                                                                                                            +
                                                                                                                                            392  // Generating sequence
                                                                                                                                            +
                                                                                                                                            393  this->init_support(array_bank, stats_bank);
                                                                                                                                            +
                                                                                                                                            394 
                                                                                                                                            +
                                                                                                                                            395  // Recursive function to count
                                                                                                                                            +
                                                                                                                                            396  if (EmptyArray.is_dense())
                                                                                                                                            +
                                                                                                                                            397  calc_backend_dense(0u, array_bank, stats_bank);
                                                                                                                                            +
                                                                                                                                            398  else
                                                                                                                                            +
                                                                                                                                            399  calc_backend_sparse(0u, array_bank, stats_bank);
                                                                                                                                            +
                                                                                                                                            400 
                                                                                                                                            +
                                                                                                                                            401  change_stats.clear();
                                                                                                                                            +
                                                                                                                                            402 
                                                                                                                                            +
                                                                                                                                            403  if (max_num_elements_ != 0u)
                                                                                                                                            +
                                                                                                                                            404  this->max_num_elements = BARRY_MAX_NUM_ELEMENTS;
                                                                                                                                            +
                                                                                                                                            405 
                                                                                                                                            +
                                                                                                                                            406  if (this->data.size() == 0u)
                                                                                                                                            +
                                                                                                                                            407  {
                                                                                                                                            +
                                                                                                                                            408  throw std::logic_error("The array has support of size 0 (i.e., empty support). This could be a problem in the rules (constraints).\n");
                                                                                                                                            +
                                                                                                                                            409  }
                                                                                                                                            410 
                                                                                                                                            -
                                                                                                                                            411  return;
                                                                                                                                            -
                                                                                                                                            412 
                                                                                                                                            -
                                                                                                                                            413 }
                                                                                                                                            -
                                                                                                                                            414 
                                                                                                                                            -
                                                                                                                                            415 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            418 ) {
                                                                                                                                            -
                                                                                                                                            419 
                                                                                                                                            -
                                                                                                                                            420  counters->add_counter(f_);
                                                                                                                                            -
                                                                                                                                            421  return;
                                                                                                                                            -
                                                                                                                                            422 
                                                                                                                                            -
                                                                                                                                            423 }
                                                                                                                                            -
                                                                                                                                            424 
                                                                                                                                            -
                                                                                                                                            425 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            428 ) {
                                                                                                                                            -
                                                                                                                                            429 
                                                                                                                                            -
                                                                                                                                            430  // Cleaning up before replacing the memory
                                                                                                                                            -
                                                                                                                                            431  if (delete_counters)
                                                                                                                                            -
                                                                                                                                            432  delete counters;
                                                                                                                                            -
                                                                                                                                            433  delete_counters = false;
                                                                                                                                            - -
                                                                                                                                            435 
                                                                                                                                            -
                                                                                                                                            436  return;
                                                                                                                                            -
                                                                                                                                            437 
                                                                                                                                            -
                                                                                                                                            438 }
                                                                                                                                            -
                                                                                                                                            439 
                                                                                                                                            -
                                                                                                                                            441 
                                                                                                                                            -
                                                                                                                                            442 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            445 ) {
                                                                                                                                            -
                                                                                                                                            446 
                                                                                                                                            -
                                                                                                                                            447  rules->add_rule(f_);
                                                                                                                                            -
                                                                                                                                            448  return;
                                                                                                                                            -
                                                                                                                                            449 
                                                                                                                                            -
                                                                                                                                            450 }
                                                                                                                                            -
                                                                                                                                            451 
                                                                                                                                            -
                                                                                                                                            452 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            455 ) {
                                                                                                                                            -
                                                                                                                                            456 
                                                                                                                                            -
                                                                                                                                            457  rules->add_rule(f_);
                                                                                                                                            -
                                                                                                                                            458  return;
                                                                                                                                            -
                                                                                                                                            459 
                                                                                                                                            -
                                                                                                                                            460 }
                                                                                                                                            -
                                                                                                                                            461 
                                                                                                                                            -
                                                                                                                                            462 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            465 ) {
                                                                                                                                            -
                                                                                                                                            466 
                                                                                                                                            -
                                                                                                                                            467  // Cleaning up before replacing the memory
                                                                                                                                            -
                                                                                                                                            468  if (delete_rules)
                                                                                                                                            -
                                                                                                                                            469  delete rules;
                                                                                                                                            -
                                                                                                                                            470  delete_rules = false;
                                                                                                                                            -
                                                                                                                                            471  rules = rules_;
                                                                                                                                            -
                                                                                                                                            472 
                                                                                                                                            -
                                                                                                                                            473  return;
                                                                                                                                            -
                                                                                                                                            474 
                                                                                                                                            -
                                                                                                                                            475 }
                                                                                                                                            -
                                                                                                                                            476 
                                                                                                                                            -
                                                                                                                                            477 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            480 ) {
                                                                                                                                            -
                                                                                                                                            481 
                                                                                                                                            -
                                                                                                                                            482  rules_dyn->add_rule(f_);
                                                                                                                                            -
                                                                                                                                            483  return;
                                                                                                                                            -
                                                                                                                                            484 
                                                                                                                                            -
                                                                                                                                            485 }
                                                                                                                                            -
                                                                                                                                            486 
                                                                                                                                            -
                                                                                                                                            487 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            490 ) {
                                                                                                                                            -
                                                                                                                                            491 
                                                                                                                                            -
                                                                                                                                            492  rules_dyn->add_rule(f_);
                                                                                                                                            -
                                                                                                                                            493  return;
                                                                                                                                            -
                                                                                                                                            494 
                                                                                                                                            -
                                                                                                                                            495 }
                                                                                                                                            -
                                                                                                                                            496 
                                                                                                                                            -
                                                                                                                                            497 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - - -
                                                                                                                                            500 ) {
                                                                                                                                            -
                                                                                                                                            501 
                                                                                                                                            -
                                                                                                                                            502  // Cleaning up before replacing the memory
                                                                                                                                            -
                                                                                                                                            503  if (delete_rules_dyn)
                                                                                                                                            -
                                                                                                                                            504  delete rules_dyn;
                                                                                                                                            -
                                                                                                                                            505  delete_rules_dyn = false;
                                                                                                                                            -
                                                                                                                                            506  rules_dyn = rules_;
                                                                                                                                            -
                                                                                                                                            507 
                                                                                                                                            -
                                                                                                                                            508  return;
                                                                                                                                            -
                                                                                                                                            509 
                                                                                                                                            -
                                                                                                                                            510 }
                                                                                                                                            -
                                                                                                                                            511 
                                                                                                                                            -
                                                                                                                                            512 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            514  const std::vector< double > & counts,
                                                                                                                                            -
                                                                                                                                            515  const size_t & i,
                                                                                                                                            -
                                                                                                                                            516  const size_t & j
                                                                                                                                            -
                                                                                                                                            517 ) {
                                                                                                                                            -
                                                                                                                                            518 
                                                                                                                                            -
                                                                                                                                            519  if (rules_dyn->size() == 0u)
                                                                                                                                            -
                                                                                                                                            520  return true;
                                                                                                                                            -
                                                                                                                                            521 
                                                                                                                                            -
                                                                                                                                            522  // Swapping pointers for a while
                                                                                                                                            -
                                                                                                                                            523  std::vector< double > tmpstats = current_stats;
                                                                                                                                            -
                                                                                                                                            524  current_stats = counts;
                                                                                                                                            -
                                                                                                                                            525 
                                                                                                                                            -
                                                                                                                                            526  bool rule_res = rules_dyn->operator()(EmptyArray, i, j);
                                                                                                                                            -
                                                                                                                                            527  current_stats = tmpstats;
                                                                                                                                            -
                                                                                                                                            528 
                                                                                                                                            -
                                                                                                                                            529  return rule_res;
                                                                                                                                            -
                                                                                                                                            530 
                                                                                                                                            -
                                                                                                                                            531 }
                                                                                                                                            -
                                                                                                                                            532 
                                                                                                                                            -
                                                                                                                                            533 // template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            -
                                                                                                                                            534 //inline bool Support<Array_Type,Data_Counter_Type,Data_Rule_Type, Data_Rule_Dyn_Type>::eval_rules_dyn(
                                                                                                                                            -
                                                                                                                                            535 // const double * counts,
                                                                                                                                            -
                                                                                                                                            536 // const size_t & i,
                                                                                                                                            -
                                                                                                                                            537 // const size_t & j
                                                                                                                                            -
                                                                                                                                            538 // ) {
                                                                                                                                            -
                                                                                                                                            539 
                                                                                                                                            -
                                                                                                                                            540 // if (rules_dyn->size() == 0u)
                                                                                                                                            -
                                                                                                                                            541 // return true;
                                                                                                                                            -
                                                                                                                                            542 
                                                                                                                                            -
                                                                                                                                            543 // // Swapping pointers for a while
                                                                                                                                            -
                                                                                                                                            544 // std::vector< double > tmpstats = current_stats;
                                                                                                                                            -
                                                                                                                                            545 // current_stats = counts;
                                                                                                                                            -
                                                                                                                                            546 
                                                                                                                                            -
                                                                                                                                            547 // bool rule_res = rules_dyn->operator()(EmptyArray, i, j);
                                                                                                                                            -
                                                                                                                                            548 // current_stats = tmpstats;
                                                                                                                                            -
                                                                                                                                            549 
                                                                                                                                            -
                                                                                                                                            550 // return rule_res;
                                                                                                                                            -
                                                                                                                                            551 
                                                                                                                                            -
                                                                                                                                            552 // }
                                                                                                                                            -
                                                                                                                                            553 
                                                                                                                                            -
                                                                                                                                            555 
                                                                                                                                            -
                                                                                                                                            556 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            558 
                                                                                                                                            -
                                                                                                                                            559  return data.get_data();
                                                                                                                                            -
                                                                                                                                            560 
                                                                                                                                            -
                                                                                                                                            561 }
                                                                                                                                            -
                                                                                                                                            562 
                                                                                                                                            -
                                                                                                                                            563 // template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            -
                                                                                                                                            564 // inline const MapVec_type<> * Support<Array_Type,Data_Counter_Type,Data_Rule_Type, Data_Rule_Dyn_Type>::get_counts_ptr() const {
                                                                                                                                            -
                                                                                                                                            565 
                                                                                                                                            -
                                                                                                                                            566 // return data.get_data_ptr();
                                                                                                                                            -
                                                                                                                                            567 
                                                                                                                                            -
                                                                                                                                            568 // }
                                                                                                                                            -
                                                                                                                                            569 
                                                                                                                                            -
                                                                                                                                            570 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            572  return &this->current_stats;
                                                                                                                                            -
                                                                                                                                            573 }
                                                                                                                                            -
                                                                                                                                            574 
                                                                                                                                            -
                                                                                                                                            575 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            577 
                                                                                                                                            -
                                                                                                                                            578  // Starting from the name of the stats
                                                                                                                                            -
                                                                                                                                            579  printf_barry("Position of variables:\n");
                                                                                                                                            -
                                                                                                                                            580  for (size_t i = 0u; i < n_counters; ++i) {
                                                                                                                                            -
                                                                                                                                            581  printf_barry("[% 2li] %s\n", i, counters->operator[](i).name.c_str());
                                                                                                                                            -
                                                                                                                                            582  }
                                                                                                                                            -
                                                                                                                                            583 
                                                                                                                                            -
                                                                                                                                            584  data.print();
                                                                                                                                            -
                                                                                                                                            585 }
                                                                                                                                            -
                                                                                                                                            586 
                                                                                                                                            -
                                                                                                                                            587 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            589  return this->data;
                                                                                                                                            -
                                                                                                                                            590 }
                                                                                                                                            -
                                                                                                                                            591 
                                                                                                                                            -
                                                                                                                                            592 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            594  return this->counters;
                                                                                                                                            -
                                                                                                                                            595 }
                                                                                                                                            -
                                                                                                                                            596 
                                                                                                                                            -
                                                                                                                                            597 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            599  return this->rules;
                                                                                                                                            -
                                                                                                                                            600 }
                                                                                                                                            -
                                                                                                                                            601 
                                                                                                                                            -
                                                                                                                                            602 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            - -
                                                                                                                                            604  return this->rules_dyn;
                                                                                                                                            -
                                                                                                                                            605 }
                                                                                                                                            -
                                                                                                                                            606 
                                                                                                                                            +
                                                                                                                                            411 
                                                                                                                                            +
                                                                                                                                            412  return;
                                                                                                                                            +
                                                                                                                                            413 
                                                                                                                                            +
                                                                                                                                            414 }
                                                                                                                                            +
                                                                                                                                            415 
                                                                                                                                            +
                                                                                                                                            416 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            419 ) {
                                                                                                                                            +
                                                                                                                                            420 
                                                                                                                                            +
                                                                                                                                            421  counters->add_counter(f_);
                                                                                                                                            +
                                                                                                                                            422  return;
                                                                                                                                            +
                                                                                                                                            423 
                                                                                                                                            +
                                                                                                                                            424 }
                                                                                                                                            +
                                                                                                                                            425 
                                                                                                                                            +
                                                                                                                                            426 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            429 ) {
                                                                                                                                            +
                                                                                                                                            430 
                                                                                                                                            +
                                                                                                                                            431  // Cleaning up before replacing the memory
                                                                                                                                            +
                                                                                                                                            432  if (delete_counters)
                                                                                                                                            +
                                                                                                                                            433  delete counters;
                                                                                                                                            +
                                                                                                                                            434  delete_counters = false;
                                                                                                                                            + +
                                                                                                                                            436 
                                                                                                                                            +
                                                                                                                                            437  return;
                                                                                                                                            +
                                                                                                                                            438 
                                                                                                                                            +
                                                                                                                                            439 }
                                                                                                                                            +
                                                                                                                                            440 
                                                                                                                                            +
                                                                                                                                            442 
                                                                                                                                            +
                                                                                                                                            443 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            446 ) {
                                                                                                                                            +
                                                                                                                                            447 
                                                                                                                                            +
                                                                                                                                            448  rules->add_rule(f_);
                                                                                                                                            +
                                                                                                                                            449  return;
                                                                                                                                            +
                                                                                                                                            450 
                                                                                                                                            +
                                                                                                                                            451 }
                                                                                                                                            +
                                                                                                                                            452 
                                                                                                                                            +
                                                                                                                                            453 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            456 ) {
                                                                                                                                            +
                                                                                                                                            457 
                                                                                                                                            +
                                                                                                                                            458  rules->add_rule(f_);
                                                                                                                                            +
                                                                                                                                            459  return;
                                                                                                                                            +
                                                                                                                                            460 
                                                                                                                                            +
                                                                                                                                            461 }
                                                                                                                                            +
                                                                                                                                            462 
                                                                                                                                            +
                                                                                                                                            463 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            466 ) {
                                                                                                                                            +
                                                                                                                                            467 
                                                                                                                                            +
                                                                                                                                            468  // Cleaning up before replacing the memory
                                                                                                                                            +
                                                                                                                                            469  if (delete_rules)
                                                                                                                                            +
                                                                                                                                            470  delete rules;
                                                                                                                                            +
                                                                                                                                            471  delete_rules = false;
                                                                                                                                            +
                                                                                                                                            472  rules = rules_;
                                                                                                                                            +
                                                                                                                                            473 
                                                                                                                                            +
                                                                                                                                            474  return;
                                                                                                                                            +
                                                                                                                                            475 
                                                                                                                                            +
                                                                                                                                            476 }
                                                                                                                                            +
                                                                                                                                            477 
                                                                                                                                            +
                                                                                                                                            478 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            481 ) {
                                                                                                                                            +
                                                                                                                                            482 
                                                                                                                                            +
                                                                                                                                            483  rules_dyn->add_rule(f_);
                                                                                                                                            +
                                                                                                                                            484  return;
                                                                                                                                            +
                                                                                                                                            485 
                                                                                                                                            +
                                                                                                                                            486 }
                                                                                                                                            +
                                                                                                                                            487 
                                                                                                                                            +
                                                                                                                                            488 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            491 ) {
                                                                                                                                            +
                                                                                                                                            492 
                                                                                                                                            +
                                                                                                                                            493  rules_dyn->add_rule(f_);
                                                                                                                                            +
                                                                                                                                            494  return;
                                                                                                                                            +
                                                                                                                                            495 
                                                                                                                                            +
                                                                                                                                            496 }
                                                                                                                                            +
                                                                                                                                            497 
                                                                                                                                            +
                                                                                                                                            498 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + + +
                                                                                                                                            501 ) {
                                                                                                                                            +
                                                                                                                                            502 
                                                                                                                                            +
                                                                                                                                            503  // Cleaning up before replacing the memory
                                                                                                                                            +
                                                                                                                                            504  if (delete_rules_dyn)
                                                                                                                                            +
                                                                                                                                            505  delete rules_dyn;
                                                                                                                                            +
                                                                                                                                            506  delete_rules_dyn = false;
                                                                                                                                            +
                                                                                                                                            507  rules_dyn = rules_;
                                                                                                                                            +
                                                                                                                                            508 
                                                                                                                                            +
                                                                                                                                            509  return;
                                                                                                                                            +
                                                                                                                                            510 
                                                                                                                                            +
                                                                                                                                            511 }
                                                                                                                                            +
                                                                                                                                            512 
                                                                                                                                            +
                                                                                                                                            513 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            515  const std::vector< double > & counts,
                                                                                                                                            +
                                                                                                                                            516  const size_t & i,
                                                                                                                                            +
                                                                                                                                            517  const size_t & j
                                                                                                                                            +
                                                                                                                                            518 ) {
                                                                                                                                            +
                                                                                                                                            519 
                                                                                                                                            +
                                                                                                                                            520  if (rules_dyn->size() == 0u)
                                                                                                                                            +
                                                                                                                                            521  return true;
                                                                                                                                            +
                                                                                                                                            522 
                                                                                                                                            +
                                                                                                                                            523  // Swapping pointers for a while
                                                                                                                                            +
                                                                                                                                            524  std::vector< double > tmpstats = current_stats;
                                                                                                                                            +
                                                                                                                                            525  current_stats = counts;
                                                                                                                                            +
                                                                                                                                            526 
                                                                                                                                            +
                                                                                                                                            527  bool rule_res = rules_dyn->operator()(EmptyArray, i, j);
                                                                                                                                            +
                                                                                                                                            528  current_stats = tmpstats;
                                                                                                                                            +
                                                                                                                                            529 
                                                                                                                                            +
                                                                                                                                            530  return rule_res;
                                                                                                                                            +
                                                                                                                                            531 
                                                                                                                                            +
                                                                                                                                            532 }
                                                                                                                                            +
                                                                                                                                            533 
                                                                                                                                            +
                                                                                                                                            534 // template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            535 //inline bool Support<Array_Type,Data_Counter_Type,Data_Rule_Type, Data_Rule_Dyn_Type>::eval_rules_dyn(
                                                                                                                                            +
                                                                                                                                            536 // const double * counts,
                                                                                                                                            +
                                                                                                                                            537 // const size_t & i,
                                                                                                                                            +
                                                                                                                                            538 // const size_t & j
                                                                                                                                            +
                                                                                                                                            539 // ) {
                                                                                                                                            +
                                                                                                                                            540 
                                                                                                                                            +
                                                                                                                                            541 // if (rules_dyn->size() == 0u)
                                                                                                                                            +
                                                                                                                                            542 // return true;
                                                                                                                                            +
                                                                                                                                            543 
                                                                                                                                            +
                                                                                                                                            544 // // Swapping pointers for a while
                                                                                                                                            +
                                                                                                                                            545 // std::vector< double > tmpstats = current_stats;
                                                                                                                                            +
                                                                                                                                            546 // current_stats = counts;
                                                                                                                                            +
                                                                                                                                            547 
                                                                                                                                            +
                                                                                                                                            548 // bool rule_res = rules_dyn->operator()(EmptyArray, i, j);
                                                                                                                                            +
                                                                                                                                            549 // current_stats = tmpstats;
                                                                                                                                            +
                                                                                                                                            550 
                                                                                                                                            +
                                                                                                                                            551 // return rule_res;
                                                                                                                                            +
                                                                                                                                            552 
                                                                                                                                            +
                                                                                                                                            553 // }
                                                                                                                                            +
                                                                                                                                            554 
                                                                                                                                            +
                                                                                                                                            556 
                                                                                                                                            +
                                                                                                                                            557 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            559 
                                                                                                                                            +
                                                                                                                                            560  return data.get_data();
                                                                                                                                            +
                                                                                                                                            561 
                                                                                                                                            +
                                                                                                                                            562 }
                                                                                                                                            +
                                                                                                                                            563 
                                                                                                                                            +
                                                                                                                                            564 // template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            +
                                                                                                                                            565 // inline const MapVec_type<> * Support<Array_Type,Data_Counter_Type,Data_Rule_Type, Data_Rule_Dyn_Type>::get_counts_ptr() const {
                                                                                                                                            +
                                                                                                                                            566 
                                                                                                                                            +
                                                                                                                                            567 // return data.get_data_ptr();
                                                                                                                                            +
                                                                                                                                            568 
                                                                                                                                            +
                                                                                                                                            569 // }
                                                                                                                                            +
                                                                                                                                            570 
                                                                                                                                            +
                                                                                                                                            571 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            573  return &this->current_stats;
                                                                                                                                            +
                                                                                                                                            574 }
                                                                                                                                            +
                                                                                                                                            575 
                                                                                                                                            +
                                                                                                                                            576 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            578 
                                                                                                                                            +
                                                                                                                                            579  // Starting from the name of the stats
                                                                                                                                            +
                                                                                                                                            580  printf_barry("Position of variables:\n");
                                                                                                                                            +
                                                                                                                                            581  for (size_t i = 0u; i < n_counters; ++i) {
                                                                                                                                            +
                                                                                                                                            582  printf_barry("[% 2li] %s\n", i, counters->operator[](i).name.c_str());
                                                                                                                                            +
                                                                                                                                            583  }
                                                                                                                                            +
                                                                                                                                            584 
                                                                                                                                            +
                                                                                                                                            585  data.print();
                                                                                                                                            +
                                                                                                                                            586 }
                                                                                                                                            +
                                                                                                                                            587 
                                                                                                                                            +
                                                                                                                                            588 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            590  return this->data;
                                                                                                                                            +
                                                                                                                                            591 }
                                                                                                                                            +
                                                                                                                                            592 
                                                                                                                                            +
                                                                                                                                            593 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            595  return this->counters;
                                                                                                                                            +
                                                                                                                                            596 }
                                                                                                                                            +
                                                                                                                                            597 
                                                                                                                                            +
                                                                                                                                            598 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            600  return this->rules;
                                                                                                                                            +
                                                                                                                                            601 }
                                                                                                                                            +
                                                                                                                                            602 
                                                                                                                                            +
                                                                                                                                            603 template <typename Array_Type, typename Data_Counter_Type, typename Data_Rule_Type, typename Data_Rule_Dyn_Type>
                                                                                                                                            + +
                                                                                                                                            605  return this->rules_dyn;
                                                                                                                                            +
                                                                                                                                            606 }
                                                                                                                                            607 
                                                                                                                                            -
                                                                                                                                            608 #endif
                                                                                                                                            +
                                                                                                                                            608 
                                                                                                                                            +
                                                                                                                                            609 #endif
                                                                                                                                            #define printf_barry
                                                                                                                                            #define BARRY_MAX_NUM_ELEMENTS
                                                                                                                                            #define BARRY_CHECK_SUPPORT(x, maxs)
                                                                                                                                            @@ -714,23 +715,23 @@
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Type > *counters_)
                                                                                                                                            std::vector< double > count_all()
                                                                                                                                            Compute the support of sufficient statistics.
                                                                                                                                            -
                                                                                                                                            bool eval_rules_dyn(const std::vector< double > &counts, const size_t &i, const size_t &j)
                                                                                                                                            -
                                                                                                                                            void calc(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr, size_t max_num_elements_=0u)
                                                                                                                                            Computes the entire support.
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            Vector of static rules (cells to iterate).
                                                                                                                                            -
                                                                                                                                            std::vector< double > get_counts() const
                                                                                                                                            +
                                                                                                                                            bool eval_rules_dyn(const std::vector< double > &counts, const size_t &i, const size_t &j)
                                                                                                                                            +
                                                                                                                                            void calc(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr, size_t max_num_elements_=0u)
                                                                                                                                            Computes the entire support.
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Type > * get_rules()
                                                                                                                                            Vector of static rules (cells to iterate).
                                                                                                                                            +
                                                                                                                                            std::vector< double > get_counts() const
                                                                                                                                            void init_support(std::vector< Array_Type > *array_bank=nullptr, std::vector< double > *stats_bank=nullptr)
                                                                                                                                            Definition: support-meat.hpp:5
                                                                                                                                            -
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            Vector of dynamic rules (to include/exclude a realizaton).
                                                                                                                                            -
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > *f_)
                                                                                                                                            -
                                                                                                                                            void print() const
                                                                                                                                            -
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > *f_)
                                                                                                                                            -
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            -
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            Vector of couter functions.
                                                                                                                                            -
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > f_)
                                                                                                                                            -
                                                                                                                                            const FreqTable< double > & get_data() const
                                                                                                                                            +
                                                                                                                                            Rules< Array_Type, Data_Rule_Dyn_Type > * get_rules_dyn()
                                                                                                                                            Vector of dynamic rules (to include/exclude a realizaton).
                                                                                                                                            +
                                                                                                                                            void add_rule(Rule< Array_Type, Data_Rule_Type > *f_)
                                                                                                                                            +
                                                                                                                                            void print() const
                                                                                                                                            +
                                                                                                                                            void add_rule_dyn(Rule< Array_Type, Data_Rule_Dyn_Type > *f_)
                                                                                                                                            +
                                                                                                                                            void set_rules_dyn(Rules< Array_Type, Data_Rule_Dyn_Type > *rules_)
                                                                                                                                            +
                                                                                                                                            Counters< Array_Type, Data_Counter_Type > * get_counters()
                                                                                                                                            Vector of couter functions.
                                                                                                                                            +
                                                                                                                                            void add_counter(Counter< Array_Type, Data_Counter_Type > f_)
                                                                                                                                            +
                                                                                                                                            const FreqTable< double > & get_data() const
                                                                                                                                            void reset_array()
                                                                                                                                            -
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            -
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            -
                                                                                                                                            std::vector< double > * get_current_stats()
                                                                                                                                            List current statistics.
                                                                                                                                            +
                                                                                                                                            void set_rules(Rules< Array_Type, Data_Rule_Type > *rules_)
                                                                                                                                            +
                                                                                                                                            void set_counters(Counters< Array_Type, Data_Counter_Type > *counters_)
                                                                                                                                            +
                                                                                                                                            std::vector< double > * get_current_stats()
                                                                                                                                            List current statistics.
                                                                                                                                            Data_Type &&counter_ data(std::move(counter_.data))
                                                                                                                                            if(add_dims)
                                                                                                                                            size_t size_t j
                                                                                                                                            @@ -746,7 +747,7 @@ diff --git a/typedefs_8hpp.html b/typedefs_8hpp.html index f08cfb1ce..4b4623d52 100644 --- a/typedefs_8hpp.html +++ b/typedefs_8hpp.html @@ -624,7 +624,7 @@

                                                                                                                                              - +
                                                                                                                                            diff --git a/typedefs_8hpp_source.html b/typedefs_8hpp_source.html index 0da238d85..5a2809fe0 100644 --- a/typedefs_8hpp_source.html +++ b/typedefs_8hpp_source.html @@ -406,7 +406,7 @@