This repository has been archived by the owner on Dec 3, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 37
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge commit 'c2f106d768ce47f72aa60c93439da3f57f574f5f'
- Loading branch information
Showing
10 changed files
with
261 additions
and
51 deletions.
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,164 @@ | ||
/** | ||
* @file | ||
* This file contains the Workspace function that adds types and functions | ||
* to the global workspace, registering them with the interpreter/compiler | ||
* during the process. | ||
* | ||
* @brief Function registering language objects | ||
* | ||
* Instructions | ||
* | ||
* This is the central registry of Rev objects. It is a large file and needs | ||
* to be properly organized to facilitate maintenance. Follow these simple | ||
* guidelines to ensure that your additions follow the existing structure. | ||
* | ||
* 1. All headers are added in groups corresponding to directories in the | ||
* revlanguage code base. | ||
* 2. All objects (types, distributions, and functions) are registered in | ||
* groups corresponding to directories in the revlanguage code base. | ||
* 3. All entries in each group are listed in alphabetical order. | ||
* | ||
* Some explanation of the directory structure is provided in the comments | ||
* in this file. Consult these comments if you are uncertain about where | ||
* to add your objects in the code. | ||
*/ | ||
|
||
|
||
#include <sstream> | ||
#include <vector> | ||
#include <set> | ||
#include <cstdlib> | ||
|
||
/* Files including helper classes */ | ||
#include "AddContinuousDistribution.h" | ||
#include "AddDistribution.h" | ||
#include "AddWorkspaceVectorType.h" | ||
#include "AddVectorizedWorkspaceType.h" | ||
#include "RbException.h" | ||
#include "RevAbstractType.h" | ||
#include "RlUserInterface.h" | ||
#include "Workspace.h" | ||
|
||
/// Miscellaneous types /// | ||
|
||
/* Base types (in folder "datatypes") */ | ||
#include "RevObject.h" | ||
#include "AbstractModelObject.h" | ||
|
||
/* Container types (in folder "datatypes/container") */ | ||
#include "RlCorrespondenceAnalysis.h" | ||
#include "RlMatrixReal.h" | ||
#include "RlMatrixRealPos.h" | ||
#include "RlMatrixRealSymmetric.h" | ||
#include "RlRateGeneratorSequence.h" | ||
#include "RlRateMatrix.h" | ||
#include "RlSimplex.h" | ||
|
||
/* Container types (in folder "datatypes/math") */ | ||
#include "ModelVector.h" | ||
#include "WorkspaceVector.h" | ||
|
||
/* Container types (in folder "distributions/phylogenetics") */ | ||
#include "Dist_bdp.h" | ||
|
||
/* Evolution types (in folder "datatypes/phylogenetics") */ | ||
#include "RlDistanceMatrix.h" | ||
|
||
/* Character state types (in folder "datatypes/phylogenetics/character") */ | ||
#include "RlAminoAcidState.h" | ||
#include "RlDnaState.h" | ||
#include "RlRnaState.h" | ||
#include "RlStandardState.h" | ||
|
||
/* Character data types (in folder "datatypes/phylogenetics/datamatrix") */ | ||
#include "RlAbstractCharacterData.h" | ||
#include "RlAbstractHomologousDiscreteCharacterData.h" | ||
#include "RlContinuousCharacterData.h" | ||
|
||
/* Tree types (in folder "datatypes/phylogenetics/trees") */ | ||
#include "RlClade.h" | ||
#include "RlRootedTripletDistribution.h" | ||
|
||
|
||
/* Taxon types (in folder "datatypes/phylogenetics") */ | ||
#include "RlTaxon.h" | ||
|
||
/* Inference types (in folder "analysis") */ | ||
#include "RlBootstrapAnalysis.h" | ||
#include "RlBurninEstimationConvergenceAssessment.h" | ||
#include "RlHillClimber.h" | ||
#include "RlMcmc.h" | ||
#include "RlMcmcmc.h" | ||
#include "RlModel.h" | ||
#include "RlPathSampler.h" | ||
#include "RlPosteriorPredictiveAnalysis.h" | ||
#include "RlPosteriorPredictiveSimulation.h" | ||
#include "RlPowerPosteriorAnalysis.h" | ||
#include "RlSteppingStoneSampler.h" | ||
#include "RlValidationAnalysis.h" | ||
#include "RlAncestralStateTrace.h" | ||
|
||
/// Stopping Rules /// | ||
#include "RlMaxIterationStoppingRule.h" | ||
#include "RlMaxTimeStoppingRule.h" | ||
#include "RlMinEssStoppingRule.h" | ||
#include "RlGelmanRubinStoppingRule.h" | ||
#include "RlGewekeStoppingRule.h" | ||
#include "RlStationarityStoppingRule.h" | ||
|
||
|
||
/// Types /// | ||
|
||
/* These types are needed as template types for the moves */ | ||
#include "RlBranchLengthTree.h" | ||
#include "RlCharacterHistoryRateModifier.h" | ||
#include "RlMonitor.h" | ||
#include "RlMove.h" | ||
#include "RlRateGenerator.h" | ||
#include "RlCladogeneticProbabilityMatrix.h" | ||
#include "RlCladogeneticSpeciationRateMatrix.h" | ||
#include "RlTimeTree.h" | ||
|
||
|
||
|
||
/** Initialize global workspace */ | ||
void RevLanguage::Workspace::initializeVectorTypeGlobalWorkspace(void) | ||
{ | ||
|
||
try | ||
{ | ||
|
||
AddWorkspaceVectorType<Taxon,4>::addTypeToWorkspace( *this, new Taxon() ); | ||
AddWorkspaceVectorType<RateGenerator,3>::addTypeToWorkspace( *this, new RateGenerator() ); | ||
AddWorkspaceVectorType<CladogeneticProbabilityMatrix,3>::addTypeToWorkspace( *this, new CladogeneticProbabilityMatrix() ); | ||
AddWorkspaceVectorType<CladogeneticSpeciationRateMatrix,3>::addTypeToWorkspace( *this, new CladogeneticSpeciationRateMatrix() ); | ||
AddWorkspaceVectorType<DistanceMatrix,3>::addTypeToWorkspace( *this, new DistanceMatrix() ); | ||
AddWorkspaceVectorType<MatrixReal,3>::addTypeToWorkspace( *this, new MatrixReal() ); | ||
AddWorkspaceVectorType<MatrixRealPos,3>::addTypeToWorkspace( *this, new MatrixRealPos() ); | ||
AddWorkspaceVectorType<MatrixRealSymmetric,3>::addTypeToWorkspace( *this, new MatrixRealSymmetric() ); | ||
AddWorkspaceVectorType<AbstractHomologousDiscreteCharacterData,3>::addTypeToWorkspace( *this, new AbstractHomologousDiscreteCharacterData() ); | ||
AddWorkspaceVectorType<ContinuousCharacterData,3>::addTypeToWorkspace( *this, new ContinuousCharacterData() ); | ||
AddWorkspaceVectorType<CharacterHistoryRateModifier,3>::addTypeToWorkspace( *this, new CharacterHistoryRateModifier() ); | ||
AddWorkspaceVectorType<TimeTree,3>::addTypeToWorkspace( *this, new TimeTree() ); | ||
AddWorkspaceVectorType<BranchLengthTree,3>::addTypeToWorkspace( *this, new BranchLengthTree() ); | ||
AddWorkspaceVectorType<Tree,3>::addTypeToWorkspace( *this, new Tree() ); | ||
AddWorkspaceVectorType<Clade,3>::addTypeToWorkspace( *this, new Clade() ); | ||
// AddWorkspaceVectorType<Dist_bdp,3>::addTypeToWorkspace( *this, new Dist_bdp() ); | ||
|
||
} | ||
catch(RbException& rbException) | ||
{ | ||
|
||
RBOUT("Caught an exception while initializing types in the workspace\n"); | ||
std::ostringstream msg; | ||
rbException.print(msg); | ||
msg << std::endl; | ||
RBOUT(msg.str()); | ||
|
||
RBOUT("Please report this bug to the RevBayes Development Core Team"); | ||
|
||
RBOUT("Press any character to exit the program."); | ||
getchar(); | ||
exit(1); | ||
} | ||
} |
Oops, something went wrong.