include/vinecopulib/bicop/implementation/class.ipp
//! Adjusts the copula model to a change in the variable order.
Adjusts the copula model to a change in the variable order.
Adjusts the copula model to a change in the variable order .
inline void
Bicop::flip()
{
  BicopFamily family = bicop_->get_family();
  if (tools_stl::is_member(family, bicop_families::flip_by_rotation)) {
    double loglik = bicop_->get_loglik();
    if (rotation_ == 90) {
      set_rotation(270);
    } else if (rotation_ == 270) {
      set_rotation(90);
    }
    bicop_->set_loglik(loglik);
  } else {
    flip_abstract_var_types();
    bicop_->flip();
  }
  std::swap(var_types_[0], var_types_[1]);
}
inline void Bicop :: flip ( ) { BicopFamily family = bicop_ -> get_family ( ) ; if ( tools_stl :: is_member ( family , bicop_families :: flip_by_rotation ) ) { double loglik = bicop_ -> get_loglik ( ) ; if ( rotation_ == 90 ) { set_rotation ( 270 ) ; } else if ( rotation_ == 270 ) { set_rotation ( 90 ) ; } bicop_ -> set_loglik ( loglik ) ; } else { flip_abstract_var_types ( ) ; bicop_ -> flip ( ) ; } std :: swap ( var_types_ [ 0 ] , var_types_ [ 1 ] ) ; }
Adjusts the copula model to a change in the variable order.
Adjusts the copula model to a change in the variable order .
// change internal representation // change Bicop-level var_types