alpar@2483: /* -*- C++ -*- alpar@2483: * alpar@2483: * This file is a part of LEMON, a generic C++ optimization library alpar@2483: * alpar@2483: * Copyright (C) 2003-2007 alpar@2483: * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport alpar@2483: * (Egervary Research Group on Combinatorial Optimization, EGRES). alpar@2483: * alpar@2483: * Permission to use, modify and distribute this software is granted alpar@2483: * provided that this copyright notice appears in all copies. For alpar@2483: * precise terms see the accompanying LICENSE file. alpar@2483: * alpar@2483: * This software is provided "AS IS" with no warranty of any kind, alpar@2483: * express or implied, and with no claim as to its suitability for any alpar@2483: * purpose. alpar@2483: * alpar@2483: */ alpar@2483: alpar@2483: #include alpar@2483: #include "test_tools.h" alpar@2483: alpar@2483: ///\file \brief Test cases for random.h alpar@2483: /// alpar@2483: ///\todo To be extended alpar@2483: /// alpar@2483: alpar@2483: int main() alpar@2483: { alpar@2483: double a=rnd(); alpar@2483: check(a<1.0&&a>0.0,"This should be in [0,1)"); alpar@2483: a=rnd.gauss(); alpar@2483: a=rnd.gamma(3.45,0); alpar@2483: a=rnd.gamma(4); alpar@2483: //Does gamma work with integer k? alpar@2483: a=rnd.gamma(4.0,0); alpar@2483: }