struct S2Cells::CellUnion
- S2Cells::CellUnion
- Struct
- Value
- Object
Defined in:
s2_cells/cell_union.crConstructors
- .get_difference(x : CellUnion, y : CellUnion) : CellUnion
- .get_intersection(cell_union : CellUnion, cell_id : CellId) : CellUnion
- .get_intersection(x : CellUnion, y : CellUnion) : CellUnion
- .get_union(x : CellUnion, y : CellUnion) : CellUnion
- .new(cell_ids : Array(CellId) | Nil = nil, raw : Bool = true)
Instance Method Summary
- #==(other : CellUnion) : Bool
- #cell_id(i : Int32) : CellId
- #cell_ids : Array(CellId)
- #contains(other : CellUnion | CellId | Cell | Point) : Bool
- #denormalize(min_level : Int32, level_mod : Int32) : Array(CellId)
- #expand(min_radius : Angle, max_level_diff : Int32)
- #expand(level : Int32)
- #get_rect_bound : LatLngRect
-
#hash : UInt64
Generates an
UInt64
hash value for this object. - #intersects(other : CellUnion | CellId) : Bool
- #normalize
- #num_cells : Int32
-
#to_s : String
Returns a nicely readable and concise string representation of this object, typically intended for users.
Constructor Detail
Instance Method Detail
Generates an UInt64
hash value for this object.
This method must have the property that a == b
implies a.hash == b.hash
.
The hash value is used along with #==
by the Hash
class to determine if two objects
reference the same hash key.
Subclasses must not override this method. Instead, they must define hash(hasher)
,
though usually the macro def_hash
can be used to generate this method.
Returns a nicely readable and concise string representation of this object, typically intended for users.
This method should usually not be overridden. It delegates to
#to_s(IO)
which can be overridden for custom implementations.
Also see #inspect
.