Source identity
| Field | Recorded value |
|---|---|
| Source type | GitHub source |
| Original record | Janady13/seferim-agi-g16 / include/common/params.hpp |
| Date | Not specified in source |
| Repository | Janady13/seferim-agi-g16 |
| Revision | 25f281b08b2f786f5a235b5abebfc39bf44d1044 |
| Branch | main |
| Path or archive member | include/common/params.hpp |
| Original SHA-256 | b74a835717a1ee65d4559f8f9cce80b812e8e4ff48d9cc9f7df86855b4e904ea |
| Git blob SHA | 0a58a3c7fd9410e019840ddb0c2e27b0c6b3eabd |
| Reading-copy SHA-256 | b74a835717a1ee65d4559f8f9cce80b812e8e4ff48d9cc9f7df86855b4e904ea |
Every recorded occurrence
These 2 records contain identical original source bytes. Their paths and revisions remain part of the archive.
| Original record | Branch or archive | Revision / identifier | Original location |
|---|---|---|---|
| Janady13/seferim-agi-g16 / include/common/params.hpp | main | 25f281b08b2f786f5a235b5abebfc39bf44d1044 | Open original |
| Janady13/seferim-agi-g16 / include/common/params.hpp | copilot/update-code-libraries | 393af96a270295f79582b2b2a77bb49dd1a9a990 | Open original |
Recovered source transcript
Download complete source text ↓40 lines · 1.1 KB
#pragma once
#include <cstdlib>
namespace common {
struct Params {
double coh_gain{1.0};
double val_gain{1.0};
double unc_gain{1.0};
double gamma_min{0.5}; // stability gate lower bound
double phi_override{0.0}; // 0 => use default
// Omega components
double alpha1{1.0}; // L1 weight
double alpha2{1.0}; // L2^2 weight
double lambda{1.0}; // stability penalty weight
};
inline double parse_env_double(const char* k, double def) {
const char* v = std::getenv(k);
if (!v) return def;
try {
return std::stod(v);
} catch (...) {
return def;
}
}
inline Params get_params() {
Params p;
p.coh_gain = parse_env_double("G16_COH_GAIN", 1.0);
p.val_gain = parse_env_double("G16_VAL_GAIN", 1.0);
p.unc_gain = parse_env_double("G16_UNC_GAIN", 1.0);
p.gamma_min = parse_env_double("G16_GAMMA_MIN", 0.5);
p.phi_override = parse_env_double("G16_PHI", 0.0);
p.alpha1 = parse_env_double("G16_OMEGA_ALPHA1", 1.0);
p.alpha2 = parse_env_double("G16_OMEGA_ALPHA2", 1.0);
p.lambda = parse_env_double("G16_OMEGA_LAMBDA", 1.0);
return p;
}
} // namespace common