# `Aerospike.Exp.HLL`
[🔗](https://github.com/luisgabrielroldan/aerospike_driver/blob/v0.3.1/lib/aerospike/exp/hll.ex#L1)

HyperLogLog expression helpers.

# `opts`

```elixir
@type opts() :: [
  {:flags, atom() | [atom()] | non_neg_integer() | {:raw, non_neg_integer()}}
]
```

HyperLogLog expression modify options.

Supported key:

* `:flags` - HLL write flags. Defaults to `:default`.

# `t`

```elixir
@type t() :: Aerospike.Exp.t()
```

Opaque server-side expression.

# `add`

```elixir
@spec add(
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  Aerospike.Exp.t(),
  opts()
) :: t()
```

Adds element expressions to an HLL expression value.

`elements` must evaluate to a list. Supports `flags:`.

# `describe`

```elixir
@spec describe(Aerospike.Exp.t()) :: t()
```

Returns `[index_bit_count, min_hash_bit_count]` for the HLL value.

# `get_count`

```elixir
@spec get_count(Aerospike.Exp.t()) :: t()
```

Returns the estimated cardinality.

# `get_intersect_count`

```elixir
@spec get_intersect_count(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
```

Returns the estimated cardinality of the intersection of `bin` and `hlls`.

# `get_similarity`

```elixir
@spec get_similarity(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
```

Returns an estimated similarity score for `bin` and `hlls`.

# `get_union`

```elixir
@spec get_union(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
```

Returns an HLL expression containing the union of `bin` and `hlls`.

# `get_union_count`

```elixir
@spec get_union_count(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
```

Returns the estimated cardinality of the union of `bin` and `hlls`.

# `init`

```elixir
@spec init(Aerospike.Exp.t(), Aerospike.Exp.t(), Aerospike.Exp.t(), opts()) :: t()
```

Creates or resets an HLL expression value.

`index_bit_count` and `min_hash_bit_count` default to `Exp.int(-1)`, asking
the server to use its defaults. Supports `flags:`.

# `may_contain`

```elixir
@spec may_contain(Aerospike.Exp.t(), Aerospike.Exp.t()) :: t()
```

Returns whether the HLL value may contain every element in `elements`.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
