Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
miscmaths
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
FSL
miscmaths
Commits
3ddd2c19
Commit
3ddd2c19
authored
17 years ago
by
Jesper Andersson
Browse files
Options
Downloads
Patches
Plain Diff
Removed references to NEWRAN
parent
2adc07a3
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
miscprob.cc
+3
-0
3 additions, 0 deletions
miscprob.cc
miscprob.h
+3
-3
3 additions, 3 deletions
miscprob.h
with
6 additions
and
3 deletions
miscprob.cc
+
3
−
0
View file @
3ddd2c19
...
@@ -171,6 +171,7 @@ ReturnMatrix mvnrnd(const RowVector& mu, const SymmetricMatrix& covar, int nsamp
...
@@ -171,6 +171,7 @@ ReturnMatrix mvnrnd(const RowVector& mu, const SymmetricMatrix& covar, int nsamp
return
mvn
.
next
(
nsamp
);
return
mvn
.
next
(
nsamp
);
}
}
/*
// Saad: Wishart and inverseWishart Random Generator
// Saad: Wishart and inverseWishart Random Generator
ReturnMatrix wishrnd(const SymmetricMatrix& sigma,const int dof){
ReturnMatrix wishrnd(const SymmetricMatrix& sigma,const int dof){
// compute cholesky factor for sigma
// compute cholesky factor for sigma
...
@@ -216,6 +217,8 @@ ReturnMatrix iwishrnd(const SymmetricMatrix& sigma,const int dof){
...
@@ -216,6 +217,8 @@ ReturnMatrix iwishrnd(const SymmetricMatrix& sigma,const int dof){
return res;
return res;
}
}
*/
ReturnMatrix
perms
(
const
int
n
){
ReturnMatrix
perms
(
const
int
n
){
if
(
n
<=
1
){
if
(
n
<=
1
){
Matrix
P
(
1
,
1
);
Matrix
P
(
1
,
1
);
...
...
This diff is collapsed.
Click to expand it.
miscprob.h
+
3
−
3
View file @
3ddd2c19
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include
"stdlib.h"
#include
"stdlib.h"
using
namespace
NEWMAT
;
using
namespace
NEWMAT
;
using
namespace
NEWRAN
;
//
using namespace NEWRAN;
namespace
MISCMATHS
{
namespace
MISCMATHS
{
...
@@ -49,8 +49,8 @@ namespace MISCMATHS {
...
@@ -49,8 +49,8 @@ namespace MISCMATHS {
// returns n! * n matrix of all possible permutations
// returns n! * n matrix of all possible permutations
ReturnMatrix
perms
(
const
int
n
);
ReturnMatrix
perms
(
const
int
n
);
ReturnMatrix
wishrnd
(
const
SymmetricMatrix
&
,
const
int
);
//
ReturnMatrix wishrnd(const SymmetricMatrix&,const int);
ReturnMatrix
iwishrnd
(
const
SymmetricMatrix
&
,
const
int
);
//
ReturnMatrix iwishrnd(const SymmetricMatrix&,const int);
class
Mvnormrandm
class
Mvnormrandm
{
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment