SCIP Doxygen Documentation
Loading...
Searching...
No Matches
genRandomLOPInstance.c File Reference

Detailed Description

generate a random linear ordering problem instance

Author
Marc Pfetsch

Definition in file genRandomLOPInstance.c.

#include <stdlib.h>
#include <stdio.h>
#include <assert.h>

Go to the source code of this file.

Macros

#define SCIP_RAND_MAX   RAND_MAX

Functions

static int getRand (unsigned int *seedp)
static int getRandomInt (int minrandval, int maxrandval, unsigned int *seedp)
int main (int argc, char **argv)

Macro Definition Documentation

◆ SCIP_RAND_MAX

#define SCIP_RAND_MAX   RAND_MAX

Definition at line 64 of file genRandomLOPInstance.c.

Referenced by getRandomInt().

Function Documentation

◆ getRand()

int getRand ( unsigned int * seedp)
static

returns a random number between 0 and SCIP_RAND_MAX

Parameters
seedppointer to seed value

Definition at line 68 of file genRandomLOPInstance.c.

References getRand().

Referenced by getRand(), and getRandomInt().

◆ getRandomInt()

int getRandomInt ( int minrandval,
int maxrandval,
unsigned int * seedp )
static

returns a random integer between minrandval and maxrandval

Parameters
minrandvalminimal value to return
maxrandvalmaximal value to return
seedppointer to seed value

Definition at line 79 of file genRandomLOPInstance.c.

References getRand(), getRandomInt(), and SCIP_RAND_MAX.

Referenced by getRandomInt(), and main().

◆ main()

int main ( int argc,
char ** argv )

Definition at line 88 of file genRandomLOPInstance.c.

References assert(), getRandomInt(), i, main(), and NULL.