华容道高性能计算引擎
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

32 lines
811 B

#pragma once
#include <vector>
#include <cstdint>
namespace klotski::cases {
struct bidi_t {
uint32_t r1;
uint32_t r2;
};
typedef std::vector<bidi_t> BidiRanges;
class Ranges : public std::vector<uint32_t> {
public:
/// Spawn klotski-ranges that match the specified block numbers.
void spawn(int n, int n_2x1, int n_1x1);
/// Derive the legal klotski-ranges with specified head.
void derive(int head, Ranges &output) const;
};
void derive_demo(const std::vector<uint32_t> &range, const std::vector<uint32_t> &reversed, std::vector<uint32_t> &output, int head);
void derive_demo_pro(const BidiRanges &bidi_range, std::vector<uint32_t> &output, int head);
// TODO: add RangesUnion here
// TODO: -> spawn from Ranges / export std::vector<CommonCode>
} // namespace klotski::cases