Giter Site home page Giter Site logo

dsrw-public's Introduction

dsrw-public

Shared code for dsrw course

task2 checker

这是 task2 的对拍器,用于检验你的程序的正确性。它将重复随机生成测试数据,运行对照程序与待测程序,并对比二者的答案。

为了使用该对拍器,你需要:

  1. (可选) 打开 task2_chk/dmk.py,修改生成的数据范围。
  2. 将可执行文件命名为 btree,置于 task2_chk 文件夹内。或者使用软链接,将可执行文件的链接置于此处。
  3. 进入 task2_chk 文件夹,运行 main

助教上传的 data maker 较慢,请耐心等待。每 check 一组测例,对拍器将会输出一行 ok。若答案错误,则会报错停止,此时 task2_chk 目录下的 in 文件是让你出错的输入,out 是你的输出,ans 是对照程序的输出。

若遇到问题或不会使用,请联系本人。

task3 description

如题,这是 task3 的形式化任务描述,若有问题请联系我。

task3 checker

这一部分包含 task3 的两个数据生成器,以及检验单组数据正确性的 checker。仅支持单个文件 data.in 读入,没有实现分配操作至多个文件的功能。

  • dmk.cpp:生成随机数据。生成方式:先生成 $10^7$insert + query,再生成 $10^7$query。所有询问操作中答案是 0 和 1 的各占一半。此程序生成的数据可用于常规正确性检验和效率测试,结果仅供参考。

  • dmk_fpr.cpp:生成极端数据:先进行 $10^7$insert,再进行 $2 \times 10^7$query,所有询问的答案都是 0。这组数据旨在尽可能多地暴露 False Positive 的问题,其 FPR 会比上面生成的正常数据要大一些。

上面两个 data maker 运行都十分缓慢,大约需要十分钟来生成一组数据,请耐心等待。数据和答案将被一起生成,数据存储在 data.in 中,答案存储在 result.ans 中。

  • chk.cpp:检验你的输出。你需要先运行你的程序,生成 result.out。checker 会读取 result.outresult.ans 进行对比,并输出你的 FPR 和 FNR。

dsrw-public's People

Contributors

orbitingflea avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.