Skip to content

Commit

Permalink
Merge pull request stan-dev#447 from stan-dev/feature/issue-443-reorg…
Browse files Browse the repository at this point in the history
…anize-agrad

Fixes stan-dev#443.
  • Loading branch information
syclik committed Dec 18, 2013
2 parents 40ca512 + a36890e commit b40be32
Show file tree
Hide file tree
Showing 606 changed files with 1,536 additions and 1,477 deletions.
15 changes: 9 additions & 6 deletions src/stan/agrad.hpp
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
#ifndef STAN_AGRAD_HPP
#define STAN_AGRAD_HPP
#ifndef __STAN__AGRAD_HPP__
#define __STAN__AGRAD_HPP__

#include <stan/agrad/agrad.hpp>
#include <stan/agrad/matrix.hpp>
#include <stan/agrad/rev/error_handling/matrix/check_pos_definite.hpp>
#include <stan/agrad/partials_vari.hpp>
// This header shouldn't be included directly.
// For reverse mode autodiff, include:
// #include <stan/agrad/rev.hpp>
// #include <stan/agrad/rev/matrix.hpp>
// For forward mode autodiff, include:
// #include <stan/agrad/fwd.hpp>
// #include <stan/agrad/fwd/matrix.hpp>

#endif
8 changes: 0 additions & 8 deletions src/stan/agrad/agrad.hpp

This file was deleted.

8 changes: 3 additions & 5 deletions src/stan/agrad/autodiff.hpp
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
#ifndef __STAN__AGRAD__AUTO_DIFF_HPP__
#define __STAN__AGRAD__AUTO_DIFF_HPP__

#define EIGEN_DENSEBASE_PLUGIN "stan/math/matrix/EigenDenseBaseAddons.h"
#include <Eigen/Dense>

#include <stan/agrad/agrad.hpp>
#include <stan/agrad/fvar.hpp>
#include <stan/math/matrix/Eigen.hpp>
#include <stan/agrad/rev.hpp>
#include <stan/agrad/fwd.hpp>

namespace stan {

Expand Down
120 changes: 0 additions & 120 deletions src/stan/agrad/fvar.hpp

This file was deleted.

10 changes: 10 additions & 0 deletions src/stan/agrad/fwd.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#ifndef __STAN__AGRAD__FWD_HPP__
#define __STAN__AGRAD__FWD_HPP__

//fvar
#include <stan/agrad/fwd/fvar.hpp>
#include <stan/agrad/fwd/numeric_limits.hpp>
#include <stan/agrad/fwd/operators.hpp>
#include <stan/agrad/fwd/functions.hpp>

#endif
76 changes: 76 additions & 0 deletions src/stan/agrad/fwd/functions.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
#ifndef __STAN__AGRAD__FWD__FUNCTIONS_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS_HPP__

#include <stan/agrad/fwd/functions/Phi.hpp>
#include <stan/agrad/fwd/functions/abs.hpp>
#include <stan/agrad/fwd/functions/acos.hpp>
#include <stan/agrad/fwd/functions/acosh.hpp>
#include <stan/agrad/fwd/functions/asin.hpp>
#include <stan/agrad/fwd/functions/asinh.hpp>
#include <stan/agrad/fwd/functions/atan.hpp>
#include <stan/agrad/fwd/functions/atan2.hpp>
#include <stan/agrad/fwd/functions/atanh.hpp>
#include <stan/agrad/fwd/functions/bessel_first_kind.hpp>
#include <stan/agrad/fwd/functions/bessel_second_kind.hpp>
#include <stan/agrad/fwd/functions/binary_log_loss.hpp>
#include <stan/agrad/fwd/functions/binomial_coefficient_log.hpp>
#include <stan/agrad/fwd/functions/cbrt.hpp>
#include <stan/agrad/fwd/functions/ceil.hpp>
#include <stan/agrad/fwd/functions/cos.hpp>
#include <stan/agrad/fwd/functions/cosh.hpp>
#include <stan/agrad/fwd/functions/digamma.hpp>
#include <stan/agrad/fwd/functions/erf.hpp>
#include <stan/agrad/fwd/functions/erfc.hpp>
#include <stan/agrad/fwd/functions/exp.hpp>
#include <stan/agrad/fwd/functions/exp2.hpp>
#include <stan/agrad/fwd/functions/expm1.hpp>
#include <stan/agrad/fwd/functions/fabs.hpp>
#include <stan/agrad/fwd/functions/falling_factorial.hpp>
#include <stan/agrad/fwd/functions/fdim.hpp>
#include <stan/agrad/fwd/functions/floor.hpp>
#include <stan/agrad/fwd/functions/fma.hpp>
#include <stan/agrad/fwd/functions/fmax.hpp>
#include <stan/agrad/fwd/functions/fmin.hpp>
#include <stan/agrad/fwd/functions/fmod.hpp>
#include <stan/agrad/fwd/functions/gamma_p.hpp>
#include <stan/agrad/fwd/functions/gamma_q.hpp>
#include <stan/agrad/fwd/functions/hypot.hpp>
#include <stan/agrad/fwd/functions/inv.hpp>
#include <stan/agrad/fwd/functions/inv_cloglog.hpp>
#include <stan/agrad/fwd/functions/inv_logit.hpp>
#include <stan/agrad/fwd/functions/inv_sqrt.hpp>
#include <stan/agrad/fwd/functions/inv_square.hpp>
#include <stan/agrad/fwd/functions/lbeta.hpp>
#include <stan/agrad/fwd/functions/lgamma.hpp>
#include <stan/agrad/fwd/functions/lmgamma.hpp>
#include <stan/agrad/fwd/functions/log.hpp>
#include <stan/agrad/fwd/functions/log10.hpp>
#include <stan/agrad/fwd/functions/log1m.hpp>
#include <stan/agrad/fwd/functions/log1m_exp.hpp>
#include <stan/agrad/fwd/functions/log1m_inv_logit.hpp>
#include <stan/agrad/fwd/functions/log1p.hpp>
#include <stan/agrad/fwd/functions/log1p_exp.hpp>
#include <stan/agrad/fwd/functions/log2.hpp>
#include <stan/agrad/fwd/functions/log_diff_exp.hpp>
#include <stan/agrad/fwd/functions/log_falling_factorial.hpp>
#include <stan/agrad/fwd/functions/log_inv_logit.hpp>
#include <stan/agrad/fwd/functions/log_rising_factorial.hpp>
#include <stan/agrad/fwd/functions/log_sum_exp.hpp>
#include <stan/agrad/fwd/functions/logit.hpp>
#include <stan/agrad/fwd/functions/modified_bessel_first_kind.hpp>
#include <stan/agrad/fwd/functions/modified_bessel_second_kind.hpp>
#include <stan/agrad/fwd/functions/multiply_log.hpp>
#include <stan/agrad/fwd/functions/owens_t.hpp>
#include <stan/agrad/fwd/functions/pow.hpp>
#include <stan/agrad/fwd/functions/rising_factorial.hpp>
#include <stan/agrad/fwd/functions/round.hpp>
#include <stan/agrad/fwd/functions/sin.hpp>
#include <stan/agrad/fwd/functions/sinh.hpp>
#include <stan/agrad/fwd/functions/sqrt.hpp>
#include <stan/agrad/fwd/functions/square.hpp>
#include <stan/agrad/fwd/functions/tan.hpp>
#include <stan/agrad/fwd/functions/tanh.hpp>
#include <stan/agrad/fwd/functions/tgamma.hpp>
#include <stan/agrad/fwd/functions/trunc.hpp>

#endif
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__PHI__HPP__
#define __STAN__AGRAD__FWD__PHI__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__PHI_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__PHI_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ABS__HPP__
#define __STAN__AGRAD__FWD__ABS__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ABS_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ABS_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ACOS__HPP__
#define __STAN__AGRAD__FWD__ACOS__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ACOS_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ACOS_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ACOSH__HPP__
#define __STAN__AGRAD__FWD__ACOSH__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ACOSH_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ACOSH_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ASIN__HPP__
#define __STAN__AGRAD__FWD__ASIN__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ASIN_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ASIN_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ASINH__HPP__
#define __STAN__AGRAD__FWD__ASINH__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ASINH_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ASINH_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ATAN__HPP__
#define __STAN__AGRAD__FWD__ATAN__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ATAN_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ATAN_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ATAN2__HPP__
#define __STAN__AGRAD__FWD__ATAN2__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ATAN2_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ATAN2_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__ATANH__HPP__
#define __STAN__AGRAD__FWD__ATANH__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__ATANH_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__ATANH_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__BESSEL_FIRST_KIND__HPP__
#define __STAN__AGRAD__FWD__BESSEL_FIRST_KIND__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__BESSEL_FIRST_KIND_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__BESSEL_FIRST_KIND_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__BESSEL_SECOND_KIND__HPP__
#define __STAN__AGRAD__FWD__BESSEL_SECOND_KIND__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__BESSEL_SECOND_KIND_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__BESSEL_SECOND_KIND_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__BINARY__LOG__LOSS__HPP__
#define __STAN__AGRAD__FWD__BINARY__LOG__LOSS__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__BINARY_LOG_LOSS_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__BINARY_LOG_LOSS_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__BINOMIAL__COEFFICIENT__LOG__HPP__
#define __STAN__AGRAD__FWD__BINOMIAL__COEFFICIENT__LOG__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__BINOMIAL_COEFFICIENT_LOG_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__BINOMIAL_COEFFICIENT_LOG_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__CBRT__HPP__
#define __STAN__AGRAD__FWD__CBRT__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__CBRT_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__CBRT_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__CEIL__HPP__
#define __STAN__AGRAD__FWD__CEIL__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__CEIL_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__CEIL_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__COS__HPP__
#define __STAN__AGRAD__FWD__COS__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__COS_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__COS_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__COSH__HPP__
#define __STAN__AGRAD__FWD__COSH__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__COSH_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__COSH_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ifndef __STAN__AGRAD__FWD__DIGAMMA__HPP__
#define __STAN__AGRAD__FWD__DIGAMMA__HPP__
#ifndef __STAN__AGRAD__FWD__FUNCTIONS__DIGAMMA_HPP__
#define __STAN__AGRAD__FWD__FUNCTIONS__DIGAMMA_HPP__

#include <stan/agrad/fwd/fvar.hpp>
#include <stan/meta/traits.hpp>
Expand Down
Loading

0 comments on commit b40be32

Please sign in to comment.