MUQ  0.4.3
umbridge Namespace Reference

Classes

class  Model
 
class  HTTPModel
 

Functions

bool check_input_sizes (const std::vector< std::vector< double >> &inputs, const json &config_json, const Model &model, httplib::Response &res)
 
bool check_sensitivity_size (const std::vector< double > &sens, int outWrt, const json &config_json, const Model &model, httplib::Response &res)
 
bool check_vector_size (const std::vector< double > &vec, int inWrt, const json &config_json, const Model &model, httplib::Response &res)
 
bool check_output_sizes (const std::vector< std::vector< double >> &outputs, const json &config_json, const Model &model, httplib::Response &res)
 
bool check_input_wrt (int inWrt, const json &config_json, const Model &model, httplib::Response &res)
 
bool check_output_wrt (int outWrt, const json &config_json, const Model &model, httplib::Response &res)
 
void write_unsupported_feature_response (httplib::Response &res, std::string feature)
 
Modelget_model_from_name (std::vector< Model * > &models, std::string name)
 
bool check_model_exists (std::vector< Model * > &models, std::string name, httplib::Response &res)
 
void serveModels (std::vector< Model * > models, std::string host, int port)
 

Function Documentation

◆ check_input_sizes()

bool umbridge::check_input_sizes ( const std::vector< std::vector< double >> &  inputs,
const json config_json,
const Model model,
httplib::Response &  res 
)

◆ check_input_wrt()

bool umbridge::check_input_wrt ( int  inWrt,
const json config_json,
const Model model,
httplib::Response &  res 
)

◆ check_model_exists()

bool umbridge::check_model_exists ( std::vector< Model * > &  models,
std::string  name,
httplib::Response &  res 
)

◆ check_output_sizes()

bool umbridge::check_output_sizes ( const std::vector< std::vector< double >> &  outputs,
const json config_json,
const Model model,
httplib::Response &  res 
)

◆ check_output_wrt()

bool umbridge::check_output_wrt ( int  outWrt,
const json config_json,
const Model model,
httplib::Response &  res 
)

◆ check_sensitivity_size()

bool umbridge::check_sensitivity_size ( const std::vector< double > &  sens,
int  outWrt,
const json config_json,
const Model model,
httplib::Response &  res 
)

◆ check_vector_size()

bool umbridge::check_vector_size ( const std::vector< double > &  vec,
int  inWrt,
const json config_json,
const Model model,
httplib::Response &  res 
)

◆ get_model_from_name()

Model& umbridge::get_model_from_name ( std::vector< Model * > &  models,
std::string  name 
)

Definition at line 400 of file umbridge.h.

Referenced by check_model_exists(), and serveModels().

◆ serveModels()

void umbridge::serveModels ( std::vector< Model * >  models,
std::string  host,
int  port 
)

Definition at line 425 of file umbridge.h.

References umbridge::Model::ApplyHessian(), umbridge::Model::ApplyJacobian(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::at(), check_input_sizes(), check_input_wrt(), check_model_exists(), check_output_sizes(), check_output_wrt(), check_sensitivity_size(), check_vector_size(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::dump(), umbridge::Model::Evaluate(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::get(), get_model_from_name(), umbridge::Model::GetInputSizes(), umbridge::Model::GetOutputSizes(), umbridge::Model::Gradient(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::parse(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::push_back(), umbridge::Model::SupportsApplyHessian(), umbridge::Model::SupportsApplyJacobian(), umbridge::Model::SupportsEvaluate(), umbridge::Model::SupportsGradient(), nlohmann::basic_json< ObjectType, ArrayType, StringType, BooleanType, NumberIntegerType, NumberUnsignedType, NumberFloatType, AllocatorType, JSONSerializer, BinaryType >::value(), and write_unsupported_feature_response().

Referenced by muq::Modeling::serveModPiece().

◆ write_unsupported_feature_response()

void umbridge::write_unsupported_feature_response ( httplib::Response &  res,
std::string  feature 
)