Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Simulate method not working for scaled separable term #314

Open
kaskr opened this issue Jun 24, 2020 · 0 comments
Open

Simulate method not working for scaled separable term #314

kaskr opened this issue Jun 24, 2020 · 0 comments
Labels

Comments

@kaskr
Copy link
Owner

kaskr commented Jun 24, 2020

Reported by @fishfollower : The following template does not compile.

#include <TMB.hpp>

template<class Type>
Type objective_function<Type>::operator() ()
{
  using namespace density;
  array<Type> omega;
  vector<Type> rho;
  Type s = 1;
  SIMULATE {
    // Separable simulate compiles as expected
    SEPARABLE(AR1(rho(1)), AR1(rho(0))).simulate(omega);
    // Scaling a factor compiles as expected
    SEPARABLE(SCALE(AR1(rho(1)), s), AR1(rho(0))).simulate(omega);
    // Scaling entire kronecker product does not compile (bug)
    SCALE(SEPARABLE(AR1(rho(1)), AR1(rho(0))), s).simulate(omega);
  }
  return 0;
}
@kaskr kaskr added the Bug label Aug 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant