Module: Mykytea

Defined in:
ext/mykytea_wrap.cxx

Defined Under Namespace

Classes: ConstIterator, GC_VALUE, Iterator, Kytea, KyteaSentence, KyteaWord, Mykytea, PairVector, PairVectorVector, Pairsd, StringVector, Tags, TagsVector

Class Method Summary collapse

Class Method Details

.<(*args) ⇒ Object

call-seq:

<(a, b) -> bool

Lower than comparison operator.



16804
16805
16806
16807
16808
16809
16810
16811
16812
16813
16814
16815
16816
16817
16818
16819
16820
16821
16822
16823
16824
16825
16826
16827
16828
16829
16830
16831
16832
16833
16834
16835
16836
16837
16838
16839
16840
16841
16842
16843
16844
16845
16846
16847
# File 'ext/mykytea_wrap.cxx', line 16804

SWIGINTERN VALUE
_wrap___lt__(int argc, VALUE *argv, VALUE self) {
  kytea::KyteaTag *arg1 = 0 ;
  kytea::KyteaTag *arg2 = 0 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  bool result;
  VALUE vresult = Qnil;
  
  if ((argc < 2) || (argc > 2)) {
    rb_raise(rb_eArgError, "wrong # of arguments(%d for 2)",argc); SWIG_fail;
  }
  res1 = SWIG_ConvertPtr(argv[0], &argp1, SWIGTYPE_p_std__pairT_KyteaString_double_t,  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), Ruby_Format_TypeError( "", "kytea::KyteaTag const &","kytea::operator <", 1, argv[0] )); 
  }
  if (!argp1) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kytea::KyteaTag const &","kytea::operator <", 1, argv[0])); 
  }
  arg1 = reinterpret_cast< kytea::KyteaTag * >(argp1);
  res2 = SWIG_ConvertPtr(argv[1], &argp2, SWIGTYPE_p_std__pairT_KyteaString_double_t,  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), Ruby_Format_TypeError( "", "kytea::KyteaTag const &","kytea::operator <", 2, argv[1] )); 
  }
  if (!argp2) {
    SWIG_exception_fail(SWIG_ValueError, Ruby_Format_TypeError("invalid null reference ", "kytea::KyteaTag const &","kytea::operator <", 2, argv[1])); 
  }
  arg2 = reinterpret_cast< kytea::KyteaTag * >(argp2);
  {
    try{
      result = (bool)kytea::operator <((std::pair< KyteaString,double > const &)*arg1,(std::pair< KyteaString,double > const &)*arg2);
    } catch (const std::exception &e){
      SWIG_exception(SWIG_RuntimeError, e.what() );
    } catch (...) {
      SWIG_exception(SWIG_UnknownError, "Unknown exception");
    }
  }
  vresult = SWIG_From_bool(static_cast< bool >(result));
  return vresult;
fail:
  return Qnil;
}