Skip to content

sam::HackingStrategy

Module: Hacking Strategies

Abstract Class of Hacking Strategies. More...

#include <HackingStrategy.h>

Inherited by sam::ConditionDropping, sam::FabricatingData, sam::FalsifyingData, sam::GroupPooling, sam::OptionalDropping, sam::OptionalStopping, sam::OutliersRemoval, sam::PeekingOutliersRemoval, sam::QuestionableRounding, sam::StoppingDataCollection, sam::SubjectiveOutlierRemoval

Public Functions

Name
virtual ~HackingStrategy() =0
Pure destructor of the Base class. This is important for proper deconstruction of Derived classes.
HackingStrategy()
void operator()(Experiment * experiment)
float defensibility() const
float prevalence() const
HackingStage stage() const
HackingTarget target() const
std::unique_ptr< HackingStrategy > build(json & hacking_strategy_config)
Factory method for building a HackingStrategy.

Public Attributes

Name
sol::state lua
std::optional< float > defensibility_
std::optional< float > prevalence_
HackingStage stage_
HackingTarget target_

Detailed Description

class sam::HackingStrategy;

Abstract Class of Hacking Strategies.

Each HackingStrategy should provide a perform() method. The perform() method will take over a pointer to an Experiment and apply the implemented hacking on it. Researcher decides if this is a pointer to a fresh copy of the Experiment or a pointer to a previously "hacked" Experiment.

Public Functions Documentation

function ~HackingStrategy

virtual ~HackingStrategy() =0

Pure destructor of the Base class. This is important for proper deconstruction of Derived classes.

function HackingStrategy

HackingStrategy()

function operator()

inline void operator()(
    Experiment * experiment
)

function defensibility

inline float defensibility() const

function prevalence

inline float prevalence() const

function stage

inline HackingStage stage() const

function target

inline HackingTarget target() const

function build

static std::unique_ptr< HackingStrategy > build(
    json & hacking_strategy_config
)

Factory method for building a HackingStrategy.

Parameters:

  • config A reference to an item of the "json[–hacking-strategy']`. Researcher::Builder is responsible for passing this object correctly.
  • config A JSON object defining a hacking strategy, and its parameters

Return:

A Factory method for building hacking strategies

Public Attributes Documentation

variable lua

sol::state lua;

variable defensibility_

std::optional< float > defensibility_;

variable prevalence_

std::optional< float > prevalence_;

variable stage_

HackingStage stage_;

variable target_

HackingTarget target_;

Updated on 29 June 2021 at 16:13:47 CEST


Last update: 2021-09-18