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

#include <leetcode.h>

Public 成员函数

 frame (int x, int y, int lock_left)
 
unsigned get_mask () const
 
bool operator< (const frame &f) const
 

Public 属性

unordered_set< char > keys
 
int lock_left
 
int step = 0
 
int x
 
int y
 

详细描述

在文件 leetcode.h3233 行定义.

构造及析构函数说明

◆ frame()

leetcode::shortest_path_to_get_all_keys::frame::frame ( int  x,
int  y,
int  lock_left 
)
inline

成员函数说明

◆ get_mask()

unsigned leetcode::shortest_path_to_get_all_keys::frame::get_mask ( ) const

在文件 leetcode.cpp9327 行定义.

9327 {
9328 unsigned mask = 0;
9329 for(const auto &key: keys) {
9330 mask |= 1 << key - 'a';
9331 }
9332 return mask;
9333 }

引用了 keys.

被这些函数引用 leetcode::shortest_path_to_get_all_keys::Solution::shortestPathAllKeys().

◆ operator<()

bool leetcode::shortest_path_to_get_all_keys::frame::operator< ( const frame f) const

在文件 leetcode.cpp9320 行定义.

9320 {
9321 if(step != f.step) {
9322 return step > f.step;
9323 }
9324 return keys.size() < f.keys.size();
9325 }

引用了 keys , 以及 step.

类成员变量说明

◆ keys

unordered_set<char> leetcode::shortest_path_to_get_all_keys::frame::keys

◆ lock_left

int leetcode::shortest_path_to_get_all_keys::frame::lock_left

在文件 leetcode.h3236 行定义.

◆ step

int leetcode::shortest_path_to_get_all_keys::frame::step = 0

◆ x

int leetcode::shortest_path_to_get_all_keys::frame::x

◆ y

int leetcode::shortest_path_to_get_all_keys::frame::y

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