# Spec D2Star AFSScore
D2Star computes the inner product of the standardised kmer count vectors.

Extends | AFScore
All Extended | AFScore
Defined in | <seqan/alignment_free.h>
Signature | `template <> struct AFScore<D2Star>;`

## Member Function Overview

- `AFScore::AFScore(kmerSize, bgModelOrder, verbose);`
  Constructor

## Member Variable Overview

- `unsigned D2StarAFScore::bgModelOrder`
  Order of the background model.
- `unsigned D2StarAFScore::kmerSize`
  Size of the kmers.
- `CharString D2StarAFScore::outputFile`
  When specified, all kmerWeights will be written to this file, for every sequence, and for every sequence comparison.

## Detailed Description

D2Star can be used for alignment-free sequence comparison, this version calculates the background model on the concatenation of both sequences

### References

Reinert, G.; Chew, D.; Sun, F., Waterman, M. S. Alignment-Free Sequence Comparison (I): Statistics and Power. J Comput Biol, 2009.

## See Also

- alignmentFreeComparison

## Member Functions Detail

### `AFScore::AFScore(kmerSize, bgModelOrder, verbose);`

Constructor

#### Parameters

`kmerSize` | Size of kmer, `unsigned`.
`bgModelOrder` | Order of the background Markov model, `unsigned`.
`verbose` | This option will report progress to standard output, `bool`.

#### Data Races

If not stated otherwise, concurrent invocation is not guaranteed to be thread-safe.

## Member Variables Detail

### `unsigned D2StarAFScore::bgModelOrder`

Order of the background model.

### `unsigned D2StarAFScore::kmerSize`

Size of the kmers.

### `CharString D2StarAFScore::outputFile`

When specified, all kmerWeights will be written to this file, for every sequence, and for every sequence comparison.

#### Dox Sources

    /*!
     * @class D2StarAFScore D2Star AFSScore
     *
     * @extends AFScore
     *
     * @headerfile <seqan/alignment_free.h>
     *
     * @brief D2Star computes the inner product of the standardised kmer count
     *        vectors.
     *
     * @signature template <> struct AFScore<D2Star>;
     *
     * D2Star can be used for alignment-free sequence comparison, this version
     * calculates the background model on the concatenation of both sequences
     *
     * @section References
     *
     * Reinert, G.; Chew, D.; Sun, F., Waterman, M. S. Alignment-Free Sequence
     * Comparison (I): Statistics and Power. J Comput Biol, 2009.
     *
     * @see alignmentFreeComparison
     *
     * @fn D2StarAFScore::AFScore
     *
     * @brief Constructor
     *
     * @signature AFScore::AFScore(kmerSize, bgModelOrder, verbose);
     *
     * @param[in] kmerSize Size of kmer, <tt>unsigned</tt>.
     * @param[in] bgModelOrder Order of the background Markov model,
     *                         <tt>unsigned</tt>.
     * @param[in] verbose This option will report progress to standard output,
     *                    <tt>bool</tt>.
     *
     * @var unsigned D2StarAFScore::kmerSize;
     *
     * @brief Size of the kmers.
     *
     * @var CharString D2StarAFScore::outputFile;
     *
     * @brief When specified, all kmerWeights will be written to this file, for
     *        every sequence, and for every sequence comparison.
     *
     * @var unsigned D2StarAFScore::bgModelOrder;
     *
     * @brief Order of the background model.
     */