parcel | Lucy |
class variable | LUCY_SPAN |
struct symbol | lucy_Span |
class nickname | lucy_Span |
header file | Lucy/Search/Span.h |
Lucy::Search::Span – An offset, a length, and a weight.
Span objects store information about a span across an array of… something. The unit is context-dependent.
Text is one possibility, in which case offset and length might be measured in Unicode code points. However, the Span could also refer to a span within an array of tokens, for example – in which case the start and offset might be measured in token positions.
lucy_Span* // incremented
lucy_Span_new(
int32_t offset,
int32_t length,
float weight
);
Create a new Span.
Integer offset, unit is context-dependent.
Integer length, unit is context-dependent.
A floating point weight.
lucy_Span*
lucy_Span_init(
lucy_Span *self,
int32_t offset,
int32_t length,
float weight
);
Initialize a Span. See new() for a description of the parameters.
int32_t
lucy_Span_Get_Offset(
lucy_Span *self
);
Accessor for offset
attribute.
void
lucy_Span_Set_Offset(
lucy_Span *self,
int32_t offset
);
Setter for offset
attribute.
int32_t
lucy_Span_Get_Length(
lucy_Span *self
);
Accessor for length
attribute.
void
lucy_Span_Set_Length(
lucy_Span *self,
int32_t length
);
Setter for length
attribute.
float
lucy_Span_Get_Weight(
lucy_Span *self
);
Accessor for weight
attribute.
void
lucy_Span_Set_Weight(
lucy_Span *self,
float weight
);
Setter for weight
attribute.
bool
lucy_Span_Equals(
lucy_Span *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
int32_t
lucy_Span_Compare_To(
lucy_Span *self,
cfish_Obj *other
);
Indicate whether one object is less than, equal to, or greater than another.
Another Obj.
Returns: 0 if the objects are equal, a negative number if
self
is less than other
, and a positive
number if self
is greater than other
.
Lucy::Search::Span is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.