Loading...
Searching...
No Matches
align_config_gap_cost_affine.hpp
Go to the documentation of this file.
// SPDX-FileCopyrightText: 2006-2025 Knut Reinert & Freie Universität Berlin
// SPDX-FileCopyrightText: 2016-2025 Knut Reinert & MPI für molekulare Genetik
// SPDX-License-Identifier: BSD-3-Clause
#pragma once
#include <seqan3/alignment/configuration/detail.hpp>
#include <seqan3/core/configuration/pipeable_config_element.hpp>
#include <seqan3/core/detail/strong_type.hpp>
namespace seqan3::align_cfg
{
// ------------------------------------------------------------------
// seqan3::align_cfg::open_score
// ------------------------------------------------------------------
struct open_score : seqan3::detail::strong_type<int32_t, open_score, seqan3::detail::strong_type_skill::convert>
{
using base_t = seqan3::detail::strong_type<int32_t, open_score, seqan3::detail::strong_type_skill::convert>;
using base_t::base_t; // Import the base class constructors
};
// ------------------------------------------------------------------
// seqan3::align_cfg::extension_score
// ------------------------------------------------------------------
struct extension_score :
seqan3::detail::strong_type<int32_t, extension_score, seqan3::detail::strong_type_skill::convert>
{
using base_t = seqan3::detail::strong_type<int32_t, extension_score, seqan3::detail::strong_type_skill::convert>;
using base_t::base_t; // Import the base class constructors
};
class gap_cost_affine : private pipeable_config_element
{
public:
int32_t open_score{0};
int32_t extension_score{-1};
constexpr gap_cost_affine() = default;
constexpr gap_cost_affine(gap_cost_affine const &) = default;
constexpr gap_cost_affine(gap_cost_affine &&) = default;
constexpr gap_cost_affine & operator=(gap_cost_affine const &) = default;
constexpr gap_cost_affine & operator=(gap_cost_affine &&) = default;
~gap_cost_affine() = default;
constexpr gap_cost_affine(seqan3::align_cfg::open_score open_score,
seqan3::align_cfg::extension_score extension_score) :
open_score(std::move(open_score)),
extension_score(std::move(extension_score))
{}
static constexpr seqan3::detail::align_config_id id{seqan3::detail::align_config_id::gap};
};
} // namespace seqan3::align_cfg
detail.hpp
Provides some utility functions for the alignment configurations.
seqan3::align_cfg::gap_cost_affine::gap_cost_affine
constexpr gap_cost_affine()=default
Defaulted.
seqan3::align_cfg::gap_cost_affine::gap_cost_affine
constexpr gap_cost_affine(seqan3::align_cfg::open_score open_score, seqan3::align_cfg::extension_score extension_score)
Construction from strongly typed open score and extension score.
Definition align_config_gap_cost_affine.hpp:100
seqan3::align_cfg::gap_cost_affine::open_score
int32_t open_score
The score per consecutive sequence of gaps. Defaults to 0.
Definition align_config_gap_cost_affine.hpp:75
seqan3::align_cfg::gap_cost_affine::gap_cost_affine
constexpr gap_cost_affine(gap_cost_affine &&)=default
Defaulted.
seqan3::align_cfg::gap_cost_affine::gap_cost_affine
constexpr gap_cost_affine(gap_cost_affine const &)=default
Defaulted.
seqan3::align_cfg::gap_cost_affine::extension_score
int32_t extension_score
The cost per gap character. Defaults to -1.
Definition align_config_gap_cost_affine.hpp:77
seqan3::align_cfg::gap_cost_affine::operator=
constexpr gap_cost_affine & operator=(gap_cost_affine const &)=default
Defaulted.
seqan3::align_cfg::gap_cost_affine::operator=
constexpr gap_cost_affine & operator=(gap_cost_affine &&)=default
Defaulted.
seqan3::align_cfg::gap_cost_affine::~gap_cost_affine
~gap_cost_affine()=default
Defaulted.
seqan3::align_cfg
A special sub namespace for the alignment configurations.
Definition align_config_band.hpp:22
std
SeqAn specific customisations in the standard namespace.
pipeable_config_element.hpp
Provides seqan3::pipeable_config_element.
strong_type.hpp
Provides basic data structure for strong types.
seqan3::align_cfg::extension_score
A strong type of underlying type int32_t that represents the score (usually negative) of any characte...
Definition align_config_gap_cost_affine.hpp:48
seqan3::align_cfg::extension_score::base_t
seqan3::detail::strong_type< int32_t, extension_score, seqan3::detail::strong_type_skill::convert > base_t
The type of the strong type base class.
Definition align_config_gap_cost_affine.hpp:50
seqan3::align_cfg::open_score
A strong type of underlying type int32_t that represents a score (usually negative) that is incurred ...
Definition align_config_gap_cost_affine.hpp:31
seqan3::align_cfg::open_score::base_t
seqan3::detail::strong_type< int32_t, open_score, seqan3::detail::strong_type_skill::convert > base_t
The type of the strong type base class.
Definition align_config_gap_cost_affine.hpp:33
seqan3::pipeable_config_element
Adds pipe interface to configuration elements.
Definition pipeable_config_element.hpp:29
Hide me