-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add symmetrize_from_lower_tri and test model
- Loading branch information
1 parent
16f0330
commit a131c80
Showing
5 changed files
with
53 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 23 additions & 0 deletions
23
test/integration/good/function-signatures/math/matrix/symmetrize_from_lower_tri.stan
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
data { | ||
int d_int; | ||
matrix[d_int,d_int] d_matrix; | ||
} | ||
|
||
transformed data { | ||
matrix[d_int,d_int] transformed_data_matrix; | ||
|
||
transformed_data_matrix = symmetrize_from_lower_tri(d_matrix); | ||
} | ||
parameters { | ||
real y_p; | ||
matrix[d_int,d_int] p_matrix; | ||
} | ||
transformed parameters { | ||
matrix[d_int,d_int] transformed_param_matrix; | ||
|
||
transformed_param_matrix = symmetrize_from_lower_tri(d_matrix); | ||
transformed_param_matrix = symmetrize_from_lower_tri(p_matrix); | ||
} | ||
model { | ||
y_p ~ normal(0,1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters