problemscpp
A collection of my answers to algorithm problems in c++.
Public 成员函数 | Public 属性 | 所有成员列表
pat::b::b1085::school结构体 参考

#include <pat.h>

Public 成员函数

 school ()=default
 
 school (string id)
 
int get_score () const
 
bool operator< (const school &) const
 

Public 属性

int a_sum = 0
 
int b_sum = 0
 
int count = 0
 
string id
 
int t_sum = 0
 

详细描述

在文件 pat.h533 行定义.

构造及析构函数说明

◆ school() [1/2]

pat::b::b1085::school::school ( )
default

◆ school() [2/2]

pat::b::b1085::school::school ( string  id)
inlineexplicit

在文件 pat.h541 行定义.

542 : id(std::move(std::move(id))){};

成员函数说明

◆ get_score()

int pat::b::b1085::school::get_score ( ) const

在文件 pat.cpp3007 行定义.

3007{ return static_cast<int>(a_sum + b_sum / 1.5 + t_sum * 1.5); }

引用了 a_sum, b_sum , 以及 t_sum.

被这些函数引用 operator<().

◆ operator<()

bool pat::b::b1085::school::operator< ( const school sc) const

在文件 pat.cpp3009 行定义.

3009 {
3010 const int score1 = this->get_score();
3011 const int score2 = sc.get_score();
3012 if(score1 != score2) {
3013 return score1 < score2;
3014 }
3015 if(count != sc.count) {
3016 return count > sc.count;
3017 }
3018 return id > sc.id;
3019 }
int get_score() const
Definition: pat.cpp:3007

引用了 count, get_score() , 以及 id.

类成员变量说明

◆ a_sum

int pat::b::b1085::school::a_sum = 0

在文件 pat.h535 行定义.

被这些函数引用 get_score().

◆ b_sum

int pat::b::b1085::school::b_sum = 0

在文件 pat.h536 行定义.

被这些函数引用 get_score().

◆ count

int pat::b::b1085::school::count = 0

在文件 pat.h538 行定义.

被这些函数引用 operator<().

◆ id

string pat::b::b1085::school::id

在文件 pat.h534 行定义.

被这些函数引用 operator<().

◆ t_sum

int pat::b::b1085::school::t_sum = 0

在文件 pat.h537 行定义.

被这些函数引用 get_score().


该结构体的文档由以下文件生成: