Neighborhood (topology v0.1.4)

Link to this section Summary

Functions

Returns a boolean value indicating whether the given set is a neighborhood of the given x in topological space.

Link to this section Functions

Link to this function

is_neighborhood?(topological_space, x, subset)

@spec is_neighborhood?(Topology.topological_space(), atom(), MapSet.t()) ::
  {:error, :subset_is_not_in_underlying_set | :x_is_not_in_underlying_set}
  | {:ok, boolean()}

Returns a boolean value indicating whether the given set is a neighborhood of the given x in topological space.

examples

Examples

iex> topological_space =
...>  {
...>   MapSet.new([:a, :b, :c]),
...>   MapSet.new([
...>     MapSet.new([]),
...>     MapSet.new([:b]),
...>     MapSet.new([:a, :b]),
...>     MapSet.new([:a, :b, :c])
...>   ])
...>  }
iex> Topology.Neighborhood.is_neighborhood?(topological_space, :a, MapSet.new([:a, :b]))
true