aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/common/partialbitvector.h
blob: 4fb5c3c0d18c9b6185d8174fb5ca555a0364292b (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.

#pragma once

#include "bitvector.h"

namespace search {

/**
 * search::PartialBitVector is a bitvector that is only represents 1 part
 * of the full space. All operations concerning the whole vector will only
 * be conducted on this smaller area.
 */
class PartialBitVector : public BitVector
{
public:
    /**
     * Class constructor specifying startindex and endindex.
     * Allocated area is zeroed.
     *
     * @param start is the beginning.
     * @end is the end.
     *
     */
    PartialBitVector(Index start, Index end);
    PartialBitVector(const BitVector & org, Index start, Index end);

    ~PartialBitVector() override;

private:
    vespalib::alloc::Alloc  _alloc;
};

} // namespace search