lucy-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mar...@apache.org
Subject [lucy-commits] [01/11] git commit: refs/heads/method-imp-names-wip2 - Migrate LucyX core to _IMP.
Date Mon, 12 Aug 2013 22:12:26 GMT
Updated Branches:
  refs/heads/method-imp-names-wip2 [created] 869523565


Migrate LucyX core to _IMP.


Project: http://git-wip-us.apache.org/repos/asf/lucy/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy/commit/3f19d831
Tree: http://git-wip-us.apache.org/repos/asf/lucy/tree/3f19d831
Diff: http://git-wip-us.apache.org/repos/asf/lucy/diff/3f19d831

Branch: refs/heads/method-imp-names-wip2
Commit: 3f19d831134c228af23127dd6a1e9112b3c40c42
Parents: cb510ae
Author: Marvin Humphrey <marvin@rectangular.com>
Authored: Fri Aug 9 13:09:53 2013 -0700
Committer: Marvin Humphrey <marvin@rectangular.com>
Committed: Mon Aug 12 15:11:38 2013 -0700

----------------------------------------------------------------------
 core/LucyX/Search/FilterMatcher.c    | 10 +++----
 core/LucyX/Search/MockMatcher.c      |  8 ++---
 core/LucyX/Search/ProximityMatcher.c | 12 ++++----
 core/LucyX/Search/ProximityQuery.c   | 50 ++++++++++++++++---------------
 4 files changed, 41 insertions(+), 39 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy/blob/3f19d831/core/LucyX/Search/FilterMatcher.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/FilterMatcher.c b/core/LucyX/Search/FilterMatcher.c
index cb26c0c..2d75916 100644
--- a/core/LucyX/Search/FilterMatcher.c
+++ b/core/LucyX/Search/FilterMatcher.c
@@ -41,14 +41,14 @@ FilterMatcher_init(FilterMatcher *self, BitVector *bits, int32_t doc_max)
{
 }
 
 void
-FilterMatcher_destroy(FilterMatcher *self) {
+FilterMatcher_Destroy_IMP(FilterMatcher *self) {
     FilterMatcherIVARS *const ivars = FilterMatcher_IVARS(self);
     DECREF(ivars->bits);
     SUPER_DESTROY(self, FILTERMATCHER);
 }
 
 int32_t
-FilterMatcher_next(FilterMatcher* self) {
+FilterMatcher_Next_IMP(FilterMatcher* self) {
     FilterMatcherIVARS *const ivars = FilterMatcher_IVARS(self);
     do {
         if (++ivars->doc_id > ivars->doc_max) {
@@ -60,19 +60,19 @@ FilterMatcher_next(FilterMatcher* self) {
 }
 
 int32_t
-FilterMatcher_skip_to(FilterMatcher* self, int32_t target) {
+FilterMatcher_Skip_To_IMP(FilterMatcher* self, int32_t target) {
     FilterMatcher_IVARS(self)->doc_id = target - 1;
     return FilterMatcher_next(self);
 }
 
 float
-FilterMatcher_score(FilterMatcher* self) {
+FilterMatcher_Score_IMP(FilterMatcher* self) {
     UNUSED_VAR(self);
     return 0.0f;
 }
 
 int32_t
-FilterMatcher_get_doc_id(FilterMatcher* self) {
+FilterMatcher_Get_Doc_ID_IMP(FilterMatcher* self) {
     return FilterMatcher_IVARS(self)->doc_id;
 }
 

http://git-wip-us.apache.org/repos/asf/lucy/blob/3f19d831/core/LucyX/Search/MockMatcher.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/MockMatcher.c b/core/LucyX/Search/MockMatcher.c
index c7b77a6..dffb664 100644
--- a/core/LucyX/Search/MockMatcher.c
+++ b/core/LucyX/Search/MockMatcher.c
@@ -37,7 +37,7 @@ MockMatcher_init(MockMatcher *self, I32Array *doc_ids, ByteBuf *scores)
{
 }
 
 void
-MockMatcher_destroy(MockMatcher *self) {
+MockMatcher_Destroy_IMP(MockMatcher *self) {
     MockMatcherIVARS *const ivars = MockMatcher_IVARS(self);
     DECREF(ivars->doc_ids);
     DECREF(ivars->scores);
@@ -45,7 +45,7 @@ MockMatcher_destroy(MockMatcher *self) {
 }
 
 int32_t
-MockMatcher_next(MockMatcher* self) {
+MockMatcher_Next_IMP(MockMatcher* self) {
     MockMatcherIVARS *const ivars = MockMatcher_IVARS(self);
     if (++ivars->tick >= (int32_t)ivars->size) {
         ivars->tick--;
@@ -55,7 +55,7 @@ MockMatcher_next(MockMatcher* self) {
 }
 
 float
-MockMatcher_score(MockMatcher* self) {
+MockMatcher_Score_IMP(MockMatcher* self) {
     MockMatcherIVARS *const ivars = MockMatcher_IVARS(self);
     if (!ivars->scores) {
         THROW(ERR, "Can't call Score() unless scores supplied");
@@ -65,7 +65,7 @@ MockMatcher_score(MockMatcher* self) {
 }
 
 int32_t
-MockMatcher_get_doc_id(MockMatcher* self) {
+MockMatcher_Get_Doc_ID_IMP(MockMatcher* self) {
     MockMatcherIVARS *const ivars = MockMatcher_IVARS(self);
     return I32Arr_Get(ivars->doc_ids, ivars->tick);
 }

http://git-wip-us.apache.org/repos/asf/lucy/blob/3f19d831/core/LucyX/Search/ProximityMatcher.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityMatcher.c b/core/LucyX/Search/ProximityMatcher.c
index 9ca7cdb..8152df3 100644
--- a/core/LucyX/Search/ProximityMatcher.c
+++ b/core/LucyX/Search/ProximityMatcher.c
@@ -71,7 +71,7 @@ ProximityMatcher_init(ProximityMatcher *self, Similarity *similarity,
 }
 
 void
-ProximityMatcher_destroy(ProximityMatcher *self) {
+ProximityMatcher_Destroy_IMP(ProximityMatcher *self) {
     ProximityMatcherIVARS *const ivars = ProximityMatcher_IVARS(self);
     if (ivars->plists) {
         for (size_t i = 0; i < ivars->num_elements; i++) {
@@ -86,7 +86,7 @@ ProximityMatcher_destroy(ProximityMatcher *self) {
 }
 
 int32_t
-ProximityMatcher_next(ProximityMatcher *self) {
+ProximityMatcher_Next_IMP(ProximityMatcher *self) {
     ProximityMatcherIVARS *const ivars = ProximityMatcher_IVARS(self);
     if (ivars->first_time) {
         return ProximityMatcher_Advance(self, 1);
@@ -101,7 +101,7 @@ ProximityMatcher_next(ProximityMatcher *self) {
 }
 
 int32_t
-ProximityMatcher_advance(ProximityMatcher *self, int32_t target) {
+ProximityMatcher_Advance_IMP(ProximityMatcher *self, int32_t target) {
     ProximityMatcherIVARS *const ivars = ProximityMatcher_IVARS(self);
     PostingList **const plists       = ivars->plists;
     const uint32_t      num_elements = ivars->num_elements;
@@ -249,7 +249,7 @@ DONE:
 }
 
 float
-ProximityMatcher_calc_proximity_freq(ProximityMatcher *self) {
+ProximityMatcher_Calc_Proximity_Freq_IMP(ProximityMatcher *self) {
     ProximityMatcherIVARS *const ivars = ProximityMatcher_IVARS(self);
     PostingList **const plists = ivars->plists;
 
@@ -315,12 +315,12 @@ ProximityMatcher_calc_proximity_freq(ProximityMatcher *self) {
 }
 
 int32_t
-ProximityMatcher_get_doc_id(ProximityMatcher *self) {
+ProximityMatcher_Get_Doc_ID_IMP(ProximityMatcher *self) {
     return ProximityMatcher_IVARS(self)->doc_id;
 }
 
 float
-ProximityMatcher_score(ProximityMatcher *self) {
+ProximityMatcher_Score_IMP(ProximityMatcher *self) {
     ProximityMatcherIVARS *const ivars = ProximityMatcher_IVARS(self);
     ScorePosting *posting = (ScorePosting*)PList_Get_Posting(ivars->plists[0]);
     float score = Sim_TF(ivars->sim, ivars->proximity_freq)

http://git-wip-us.apache.org/repos/asf/lucy/blob/3f19d831/core/LucyX/Search/ProximityQuery.c
----------------------------------------------------------------------
diff --git a/core/LucyX/Search/ProximityQuery.c b/core/LucyX/Search/ProximityQuery.c
index 6f9f645..32d4c77 100644
--- a/core/LucyX/Search/ProximityQuery.c
+++ b/core/LucyX/Search/ProximityQuery.c
@@ -57,7 +57,7 @@ ProximityQuery_init(ProximityQuery *self, const CharBuf *field, VArray *terms,
 }
 
 void
-ProximityQuery_destroy(ProximityQuery *self) {
+ProximityQuery_Destroy_IMP(ProximityQuery *self) {
     ProximityQueryIVARS *const ivars = ProximityQuery_IVARS(self);
     DECREF(ivars->terms);
     DECREF(ivars->field);
@@ -79,7 +79,7 @@ S_do_init(ProximityQuery *self, CharBuf *field, VArray *terms, float boost,
 }
 
 void
-ProximityQuery_serialize(ProximityQuery *self, OutStream *outstream) {
+ProximityQuery_Serialize_IMP(ProximityQuery *self, OutStream *outstream) {
     ProximityQueryIVARS *const ivars = ProximityQuery_IVARS(self);
     OutStream_Write_F32(outstream, ivars->boost);
     Freezer_serialize_charbuf(ivars->field, outstream);
@@ -88,7 +88,7 @@ ProximityQuery_serialize(ProximityQuery *self, OutStream *outstream) {
 }
 
 ProximityQuery*
-ProximityQuery_deserialize(ProximityQuery *self, InStream *instream) {
+ProximityQuery_Deserialize_IMP(ProximityQuery *self, InStream *instream) {
     float boost = InStream_Read_F32(instream);
     CharBuf *field = Freezer_read_charbuf(instream);
     VArray  *terms = Freezer_read_varray(instream);
@@ -97,8 +97,7 @@ ProximityQuery_deserialize(ProximityQuery *self, InStream *instream) {
 }
 
 Obj*
-ProximityQuery_dump(ProximityQuery *self)
-{
+ProximityQuery_Dump_IMP(ProximityQuery *self) {
     ProximityQueryIVARS *ivars = ProximityQuery_IVARS(self);
     ProximityQuery_Dump_t super_dump
         = SUPER_METHOD_PTR(PROXIMITYQUERY, Lucy_ProximityQuery_Dump);
@@ -111,8 +110,7 @@ ProximityQuery_dump(ProximityQuery *self)
 }
 
 Obj*
-ProximityQuery_load(ProximityQuery *self, Obj *dump)
-{
+ProximityQuery_Load_IMP(ProximityQuery *self, Obj *dump) {
     Hash *source = (Hash*)CERTIFY(dump, HASH);
     ProximityQuery_Load_t super_load
         = SUPER_METHOD_PTR(PROXIMITYQUERY, Lucy_ProximityQuery_Load);
@@ -128,7 +126,7 @@ ProximityQuery_load(ProximityQuery *self, Obj *dump)
 }
 
 bool
-ProximityQuery_equals(ProximityQuery *self, Obj *other) {
+ProximityQuery_Equals_IMP(ProximityQuery *self, Obj *other) {
     if ((ProximityQuery*)other == self)   { return true; }
     if (!Obj_Is_A(other, PROXIMITYQUERY)) { return false; }
     ProximityQueryIVARS *const ivars = ProximityQuery_IVARS(self);
@@ -147,7 +145,7 @@ ProximityQuery_equals(ProximityQuery *self, Obj *other) {
 }
 
 CharBuf*
-ProximityQuery_to_string(ProximityQuery *self) {
+ProximityQuery_To_String_IMP(ProximityQuery *self) {
     ProximityQueryIVARS *const ivars = ProximityQuery_IVARS(self);
     uint32_t num_terms = VA_Get_Size(ivars->terms);
     CharBuf *retval = CB_Clone(ivars->field);
@@ -167,8 +165,8 @@ ProximityQuery_to_string(ProximityQuery *self) {
 }
 
 Compiler*
-ProximityQuery_make_compiler(ProximityQuery *self, Searcher *searcher,
-                             float boost, bool subordinate) {
+ProximityQuery_Make_Compiler_IMP(ProximityQuery *self, Searcher *searcher,
+                                 float boost, bool subordinate) {
     ProximityQueryIVARS *const ivars = ProximityQuery_IVARS(self);
     if (VA_Get_Size(ivars->terms) == 1) {
         // Optimize for one-term "phrases".
@@ -192,17 +190,17 @@ ProximityQuery_make_compiler(ProximityQuery *self, Searcher *searcher,
 }
 
 CharBuf*
-ProximityQuery_get_field(ProximityQuery *self) {
+ProximityQuery_Get_Field_IMP(ProximityQuery *self) {
     return ProximityQuery_IVARS(self)->field;
 }
 
 VArray*
-ProximityQuery_get_terms(ProximityQuery *self) {
+ProximityQuery_Get_Terms_IMP(ProximityQuery *self) {
     return ProximityQuery_IVARS(self)->terms;
 }
 
 uint32_t
-ProximityQuery_get_within(ProximityQuery  *self) {
+ProximityQuery_Get_Within_IMP(ProximityQuery  *self) {
     return ProximityQuery_IVARS(self)->within;
 }
 
@@ -250,7 +248,8 @@ ProximityCompiler_init(ProximityCompiler *self, ProximityQuery *parent,
 }
 
 void
-ProximityCompiler_serialize(ProximityCompiler *self, OutStream *outstream) {
+ProximityCompiler_Serialize_IMP(ProximityCompiler *self,
+                                OutStream *outstream) {
     ProximityCompiler_Serialize_t super_serialize
             = SUPER_METHOD_PTR(PROXIMITYCOMPILER, Lucy_ProximityCompiler_Serialize);
     super_serialize(self, outstream);
@@ -263,7 +262,8 @@ ProximityCompiler_serialize(ProximityCompiler *self, OutStream *outstream)
{
 }
 
 ProximityCompiler*
-ProximityCompiler_deserialize(ProximityCompiler *self, InStream *instream) {
+ProximityCompiler_Deserialize_IMP(ProximityCompiler *self,
+                                  InStream *instream) {
     ProximityCompiler_Deserialize_t super_deserialize
             = SUPER_METHOD_PTR(PROXIMITYCOMPILER, Lucy_ProximityCompiler_Deserialize);
     self = super_deserialize(self, instream);
@@ -277,7 +277,7 @@ ProximityCompiler_deserialize(ProximityCompiler *self, InStream *instream)
{
 }
 
 bool
-ProximityCompiler_equals(ProximityCompiler *self, Obj *other) {
+ProximityCompiler_Equals_IMP(ProximityCompiler *self, Obj *other) {
     if ((ProximityCompiler*)other == self)        { return true; }
     if (!Obj_Is_A(other, PROXIMITYCOMPILER))      { return false; }
     if (!Compiler_equals((Compiler*)self, other)) { return false; }
@@ -293,26 +293,27 @@ ProximityCompiler_equals(ProximityCompiler *self, Obj *other) {
 }
 
 float
-ProximityCompiler_get_weight(ProximityCompiler *self) {
+ProximityCompiler_Get_Weight_IMP(ProximityCompiler *self) {
     return ProximityCompiler_IVARS(self)->normalized_weight;
 }
 
 float
-ProximityCompiler_sum_of_squared_weights(ProximityCompiler *self) {
+ProximityCompiler_Sum_Of_Squared_Weights_IMP(ProximityCompiler *self) {
     ProximityCompilerIVARS *const ivars = ProximityCompiler_IVARS(self);
     return ivars->raw_weight * ivars->raw_weight;
 }
 
 void
-ProximityCompiler_apply_norm_factor(ProximityCompiler *self, float factor) {
+ProximityCompiler_Apply_Norm_Factor_IMP(ProximityCompiler *self,
+                                        float factor) {
     ProximityCompilerIVARS *const ivars = ProximityCompiler_IVARS(self);
     ivars->query_norm_factor = factor;
     ivars->normalized_weight = ivars->raw_weight * ivars->idf * factor;
 }
 
 Matcher*
-ProximityCompiler_make_matcher(ProximityCompiler *self, SegReader *reader,
-                               bool need_score) {
+ProximityCompiler_Make_Matcher_IMP(ProximityCompiler *self, SegReader *reader,
+                                   bool need_score) {
     ProximityCompilerIVARS *const ivars = ProximityCompiler_IVARS(self);
     UNUSED_VAR(need_score);
     ProximityQueryIVARS *const parent_ivars
@@ -361,8 +362,9 @@ ProximityCompiler_make_matcher(ProximityCompiler *self, SegReader *reader,
 }
 
 VArray*
-ProximityCompiler_highlight_spans(ProximityCompiler *self, Searcher *searcher,
-                                  DocVector *doc_vec, const CharBuf *field) {
+ProximityCompiler_Highlight_Spans_IMP(ProximityCompiler *self,
+                                      Searcher *searcher, DocVector *doc_vec,
+                                      const CharBuf *field) {
     ProximityCompilerIVARS *const ivars = ProximityCompiler_IVARS(self);
     ProximityQueryIVARS *const parent_ivars
         = ProximityQuery_IVARS((ProximityQuery*)ivars->parent);


Mime
View raw message