Ignore:
Timestamp:
05/09/08 12:42:32 (17 years ago)
Author:
obrebski <obrebski@…>
Branches:
master, help
Children:
19760ef
Parents:
3748bd1
git-author:
obrebski <obrebski@…> (05/09/08 12:42:32)
git-committer:
obrebski <obrebski@…> (05/09/08 12:42:32)
Message:

gue wreszcie dziala, tylko nie sortuje wynikow

git-svn-id: svn://atos.wmid.amu.edu.pl/utt@50 e293616e-ec6a-49c2-aa92-f4a8b91c5d16

File:
1 edited

Legend:

Unmodified
Added
Removed
  • app/src/lib/word.cc

    rac7d970 r6ac84d8  
    1616  lemd[i]='\0'; 
    1717  if(isdigit(lemd[0])) 
    18     fullform(f,lemd,l);  // je¶li lemat zakodowany 
     18    fullform(f,lemd,l);  // je¶li lemat zakodowany 
    1919  else 
    20     strcpy(l,lemd);     // je¶li lemat w pe³nej postaci 
     20    strcpy(l,lemd);     // je¶li lemat w pe³nej postaci 
    2121  strcpy(d,de+i+1); 
    2222} 
     
    2525bool Word::cmp_w(Word a, Word b) { 
    2626  return (a.w_suf() > b.w_suf()); 
     27} 
     28//--------------------------------------------------------------------------- 
     29bool Word::cmp_w_rev(Word a, Word b) { 
     30  return (a.w_suf() < b.w_suf()); 
     31} 
     32//--------------------------------------------------------------------------- 
     33bool cmp_w_fun(Word a, Word b) { 
     34  return (a.w_suf() > b.w_suf()); 
     35} 
     36//--------------------------------------------------------------------------- 
     37bool cmp_w_rev_fun(Word a, Word b) { 
     38  return (a.w_suf() < b.w_suf()); 
    2739} 
    2840//--------------------------------------------------------------------------- 
     
    110122void Words::sort() { 
    111123  std::sort(tab.begin(), tab.end(), Word::cmp_w); 
     124} 
     125 
     126//--------------------------------------------------------------------------- 
     127void Words::sort_rev() { 
     128  std::sort(tab.begin(), tab.end(), cmp_w_rev_fun); 
    112129} 
    113130 
Note: See TracChangeset for help on using the changeset viewer.