All Downloads are FREE. Search and download functionalities are using the official Maven repository.

z3-z3-4.12.6.src.util.luby.h Maven / Gradle / Ivy

There is a newer version: 4.13.0.1
Show newest version
/*++
Copyright (c) 2006 Microsoft Corporation

Module Name:

    luby.h

Abstract:

    

Author:

    Leonardo de Moura (leonardo) 2008-03-04.

Revision History:

--*/
#pragma once

/**
   \brief Return the i-th element of the Luby sequence: 1,1,2,1,1,2,4,1,1,2,1,1,2,4,8,...

   get_luby(i) = 2^{i-1}                     if  i = 2^k -1
   get_luby(i) = get_luby(i - 2^{k-1} + 1)   if  2^{k-1} <= i < 2^k - 1
*/
unsigned get_luby(unsigned i);






© 2015 - 2024 Weber Informatics LLC | Privacy Policy