problemscpp
A collection of my answers to algorithm problems in c++.
载入中...
搜索中...
未找到
acwing::acwing1470::status结构体 参考

#include <acwing.h>

Public 成员函数

 status (int len, pair< int, int > current, pair< int, int > target)
 
int get_weight () const
 
bool operator< (const status &s) const
 

Public 属性

pair< int, int > current
 
int len
 
pair< int, int > target
 

详细描述

在文件 acwing.h1855 行定义.

构造及析构函数说明

◆ status()

acwing::acwing1470::status::status ( int len,
pair< int, int > current,
pair< int, int > target )
inline

在文件 acwing.h1862 行定义.

1863 : len(len), current(std::move(current)), target(std::move(target)) {}

引用了 current, len , 以及 target.

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

成员函数说明

◆ get_weight()

int acwing::acwing1470::status::get_weight ( ) const
nodiscard

在文件 acwing.cpp5978 行定义.

5978{ return len + abs(current.first - target.first) + abs(current.second - target.second); }

引用了 current, get_weight(), len , 以及 target.

被这些函数引用 get_weight() , 以及 operator<().

◆ operator<()

bool acwing::acwing1470::status::operator< ( const status & s) const

在文件 acwing.cpp5976 行定义.

5976{ return this->get_weight() > s.get_weight(); }

引用了 status(), get_weight() , 以及 operator<().

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

类成员变量说明

◆ current

pair<int, int> acwing::acwing1470::status::current

在文件 acwing.h1857 行定义.

被这些函数引用 status(), get_weight() , 以及 acwing::acwing1470::main().

◆ len

int acwing::acwing1470::status::len

在文件 acwing.h1856 行定义.

被这些函数引用 status(), get_weight() , 以及 acwing::acwing1470::main().

◆ target

pair<int, int> acwing::acwing1470::status::target

在文件 acwing.h1858 行定义.

被这些函数引用 status() , 以及 get_weight().


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