Skip to content

Commit

Permalink
Merge pull request #19 from zoj613/rel-0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
zoj613 authored Dec 21, 2020
2 parents 945a5b9 + d6ed4d0 commit 9ad37e7
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Package: htnorm
Version: 0.1.1
Version: 0.2.0
Title: Fast Simulation of Hyperplane-Truncated Multivariate Normal Distributions
Author: Zolisa Bleki
Maintainer: Zolisa Bleki <[email protected]>
Expand Down
2 changes: 1 addition & 1 deletion pyhtnorm/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from ._htnorm import HTNGenerator

__version__ = '0.1.1'
__version__ = '0.2.0'
4 changes: 3 additions & 1 deletion pyhtnorm/_htnorm.pyx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ cdef class HTNGenerator:
The name of the generator to use for random number generation. The
value needs to be one of {'pcg', 'xrs'}, where 'pcg' is PCG64 and 'xrs'
is the Xoroshiro128plus bit generator.
Methods -------
Methods
-------
hyperplane_truncated_mvnorm(mean, cov, g, r, diag=False, out=False)
structured_precision_mvnorm(mean, a, phi, omega, mean_structured=False,
a_type=0, o_type=0, out=None)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "pyhtnorm"
version = "0.1.1"
version = "0.2.0"
description = "Fast Simulation of Hyperplane-Truncated Multivatiate Normal Distributions"
authors = ["Zolisa Bleki"]
license = "BSD-3-Clause"
Expand Down
2 changes: 0 additions & 2 deletions src/dist.c
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,6 @@
#define std_normal_rand_fill(rng_t, arr_size, arr) \
for (size_t inc = (arr_size); inc--;) (arr)[inc] = std_normal_rand((rng_t))

extern ALWAYS_INLINE(mvn_output_t*) mvn_output_new(size_t nrow, type_t factor_type);
extern ALWAYS_INLINE(void) mvn_output_free(mvn_output_t* a);

// Generate a sample from the standard normal distribution using the Ziggurat method.
// This uses numpy's implementation of the algorithm.
Expand Down
4 changes: 2 additions & 2 deletions src/dist.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ typedef struct {
/* Get an instance of the `mvn_output_t` struct pointer whose elements have
* dimension `nrow`. The members are allocated memeory on the heap, and thus
* need to free'd using `mvn_output_free` when no longer needed.*/
ALWAYS_INLINE(mvn_output_t*)
static ALWAYS_INLINE(mvn_output_t*)
mvn_output_new(size_t nrow, type_t factor_type)
{
mvn_output_t* out = malloc(sizeof(mvn_output_t));
Expand All @@ -50,7 +50,7 @@ mvn_output_new(size_t nrow, type_t factor_type)
}


ALWAYS_INLINE(void)
static ALWAYS_INLINE(void)
mvn_output_free(mvn_output_t* a)
{
free(a->factor);
Expand Down

0 comments on commit 9ad37e7

Please sign in to comment.