vg
tools for working with variation graphs
Public Member Functions | Protected Attributes | Friends | List of all members
vg::IndexingPlan Class Reference

#include <index_registry.hpp>

Public Member Functions

 IndexingPlan ()=default
 
 ~IndexingPlan ()=default
 
string output_filepath (const IndexName &identifier) const
 Get the suffix with which to save the given index's files. More...
 
string output_filepath (const IndexName &identifier, size_t chunk, size_t num_chunks) const
 Get the suffix with which to save the given index's files. More...
 
const vector< RecipeName > & get_steps () const
 Ge the steps of the plan. More...
 
bool is_intermediate (const IndexName &identifier) const
 
int64_t target_memory_usage () const
 The memory limit, with a little slosh for prediction inaccuracy. More...
 
int64_t literal_target_memory_usage () const
 The mmeory limit with no slosh. More...
 
set< RecipeNamedependents (const IndexName &identifier) const
 

Protected Attributes

vector< RecipeNamesteps
 
set< IndexNametargets
 The indexes to create as outputs. More...
 
IndexRegistryregistry
 

Friends

class IndexRegistry
 

Detailed Description

A plan for producing indexes, which knows what should be saved and what should be ephemeral. Wants to be nested inside IndexRegistry, but you can't forward-declare a nested class.

Constructor & Destructor Documentation

◆ IndexingPlan()

vg::IndexingPlan::IndexingPlan ( )
default

◆ ~IndexingPlan()

vg::IndexingPlan::~IndexingPlan ( )
default

Member Function Documentation

◆ dependents()

set< RecipeName > vg::IndexingPlan::dependents ( const IndexName identifier) const

Returns the recipes in the plan that depend on this index, including the one in which it was created (if any)

◆ get_steps()

const vector< RecipeName > & vg::IndexingPlan::get_steps ( ) const

Ge the steps of the plan.

◆ is_intermediate()

bool vg::IndexingPlan::is_intermediate ( const IndexName identifier) const

Returns true if the given index is to be intermediate under the given plan, and false if it is to be preserved.

◆ literal_target_memory_usage()

int64_t vg::IndexingPlan::literal_target_memory_usage ( ) const

The mmeory limit with no slosh.

◆ output_filepath() [1/2]

string vg::IndexingPlan::output_filepath ( const IndexName identifier) const

Get the suffix with which to save the given index's files.

◆ output_filepath() [2/2]

string vg::IndexingPlan::output_filepath ( const IndexName identifier,
size_t  chunk,
size_t  num_chunks 
) const

Get the suffix with which to save the given index's files.

◆ target_memory_usage()

int64_t vg::IndexingPlan::target_memory_usage ( ) const

The memory limit, with a little slosh for prediction inaccuracy.

Friends And Related Function Documentation

◆ IndexRegistry

friend class IndexRegistry
friend

Member Data Documentation

◆ registry

IndexRegistry* vg::IndexingPlan::registry
protected

The registry that the plan is using. The registry must not move while the plan is in use. Can't be const because we need to get_work_dir() on it, which may create the work directory.

◆ steps

vector<RecipeName> vg::IndexingPlan::steps
protected

The steps to be invoked in the plan. May be empty before the plan is actually planned.

◆ targets

set<IndexName> vg::IndexingPlan::targets
protected

The indexes to create as outputs.


The documentation for this class was generated from the following files: