📄 ngrm_sort_0.cc
字号:
// file: ngrm_sort_0.cc//// system include files//#include <string.h>#include <ctype.h>// isip include files//#include "ngram.h"#include "ngram_constants.h"// method: ngnode_compare_cc//// arguments:// Ngram_node* first: (input) a Ngram_node to compare// Ngram_node* second: (input) a second Ngram_node to compare//// return: an integer specifying the sort order based on the word id// if the word id of first is greater than the word id of// second then a positive number is returned// if the word id of second is greater than the word id of first// then a negative number is returned// if the word ids are equal then a zero is returned//// this method compares the two inputs for sort order//int Ngram::ngnode_compare_cc(Ngram_node** first_a, Ngram_node** second_a) { if ((int_4)((*first_a)->get_word_cc()) > (int_4)((*second_a)->get_word_cc())) { return 1; } if ((int_4)((*first_a)->get_word_cc()) < (int_4)((*second_a)->get_word_cc())) { return -1; } return 0;}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -