Scippy

SCIP

Solving Constraint Integer Programs

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 60 of file genRandomLOPInstance.c.

Referenced by getRandomInt().

Function Documentation

◆ getRand()

static int getRand ( unsigned int *  seedp)
static

returns a random number between 0 and SCIP_RAND_MAX

Parameters
seedppointer to seed value

Definition at line 64 of file genRandomLOPInstance.c.

Referenced by getRandomInt().

◆ getRandomInt()

static 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 75 of file genRandomLOPInstance.c.

References getRand(), and SCIP_RAND_MAX.

Referenced by main().

◆ main()

int main ( int  argc,
char **  argv 
)

Definition at line 84 of file genRandomLOPInstance.c.

References getRandomInt(), and NULL.