Download examples/lease_cpp.cpp from PureOne/YEORIN-X-v4-Research: direct link, hf CLI and curl.
- Browser
- Download file 699 Bytes
-
https://huggingface.co/datasets/PureOne/YEORIN-X-v4-Research/resolve/main/examples/lease_cpp.cpp
- Command line
-
hf download hf://datasets/PureOne/YEORIN-X-v4-Research/examples/lease_cpp.cpp
-
curl -L -o lease_cpp.cpp https://huggingface.co/datasets/PureOne/YEORIN-X-v4-Research/resolve/main/examples/lease_cpp.cpp
699 Bytes
| // Build from repository root: c++ -std=c++17 -I native4 examples/lease_cpp.cpp -o lease-example | |
| // Constructed scalar example; caps are assumed and do not come from a game. | |
| int main() { | |
| yeorin4::Lease l; | |
| l.source=7; l.generation=1; l.epoch=2; | |
| l.published=1.; l.expires=1.010; | |
| l.a=30.; l.energy=16.; l.maximum=5.; l.residual=10.; | |
| yeorin4::Query q; | |
| q.source=7; q.generation=1; q.epoch=2; | |
| q.now=1.005; q.drift=.2; q.nativeOffset=0.; q.pixelCap=4.; | |
| auto d=yeorin4::revalidate(l,q); | |
| std::cout << "status=" << d.status << " alpha=" << d.alpha << " lower_px2=" << d.lower << '\n'; | |
| return d.status==1 && d.alpha>0 ? 0 : 1; | |
| } | |