Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F73003417
common_def.hpp
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Thu, Jul 18, 00:50
Size
1 KB
Mime Type
text/x-c++
Expires
Sat, Jul 20, 00:50 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
19130371
Attached To
rSPECMICP SpecMiCP / ReactMiCP
common_def.hpp
View Options
/*-------------------------------------------------------
- Module : database
- File : common_def.hpp
- Author : Fabien Georget
Copyright (c) 2014, Fabien Georget, Princeton University
---------------------------------------------------------*/
#ifndef SPECMICP_DATABASE_COMMONDEF_HPP
#define SPECMICP_DATABASE_COMMONDEF_HPP
#include <vector>
#include <Eigen/Core>
#include <exception>
//! \file common_def.hpp common type definitions
namespace specmicp {
namespace database {
//! ID of a species
using id_species_t = unsigned int;
//! Vector containing a list of species (by ID)
using list_species_t = std::vector<id_species_t>;
//! Vector containing each strings
using vector_labels_t = std::vector<std::string>;
//! Stoechiometric coefficients for the reactions
using reaction_mat_t = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic>;
//! Vector containing logK values
using logK_vector_t = Eigen::Matrix<double, Eigen::Dynamic, 1>;
//! \brief This error is thrown when a bad syntax is detected in the database
class db_invalid_syntax : public std::invalid_argument
{
public:
db_invalid_syntax (const std::string &msg):
std::invalid_argument("Invalid syntax : " + msg)
{}
};
//! \brief This error is thrown when the database is not as expected
class invalid_database : public std::invalid_argument
{
public:
invalid_database (const std::string &msg):
std::invalid_argument("Invalid Database : " + msg)
{}
};
} // end namespace database
} // end namespace specmicp
#endif // SPECMICP_DATABASE_COMMONDEF_HPP
Event Timeline
Log In to Comment