Module: Legion::Extensions::Agentic::Inference::Magnet::Helpers::Constants
- Defined in:
- lib/legion/extensions/agentic/inference/magnet/helpers/constants.rb
Constant Summary collapse
- POLARITY_TYPES =
%i[positive negative neutral bipolar].freeze
- MATERIAL_TYPES =
%i[iron cobalt nickel lodestone ferrite].freeze
- MAX_POLES =
500- MAX_FIELDS =
50- ATTRACTION_RATE =
0.08- REPULSION_RATE =
0.06- DECAY_RATE =
0.02- STRENGTH_LABELS =
{ (0.0..0.1) => :negligible, (0.1..0.3) => :faint, (0.3..0.5) => :moderate, (0.5..0.7) => :strong, (0.7..0.9) => :intense, (0.9..1.0) => :overwhelming }.freeze
- ALIGNMENT_LABELS =
{ (0.0..0.2) => :chaotic, (0.2..0.4) => :discordant, (0.4..0.6) => :neutral, (0.6..0.8) => :coherent, (0.8..1.0) => :perfect }.freeze
Class Method Summary collapse
- .label_for(table, value) ⇒ Object
- .valid_material?(material) ⇒ Boolean
- .valid_polarity?(polarity) ⇒ Boolean
Class Method Details
.label_for(table, value) ⇒ Object
37 38 39 40 41 42 |
# File 'lib/legion/extensions/agentic/inference/magnet/helpers/constants.rb', line 37 def label_for(table, value) table.each do |range, label| return label if range.cover?(value) end :unknown end |
.valid_material?(material) ⇒ Boolean
48 49 50 |
# File 'lib/legion/extensions/agentic/inference/magnet/helpers/constants.rb', line 48 def valid_material?(material) MATERIAL_TYPES.include?(material) end |
.valid_polarity?(polarity) ⇒ Boolean
44 45 46 |
# File 'lib/legion/extensions/agentic/inference/magnet/helpers/constants.rb', line 44 def valid_polarity?(polarity) POLARITY_TYPES.include?(polarity) end |