Scippy

    SCIP

    Solving Constraint Integer Programs

    type_rational.h
    Go to the documentation of this file.
    1/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    2/* */
    3/* This file is part of the program and library */
    4/* SCIP --- Solving Constraint Integer Programs */
    5/* */
    6/* Copyright (c) 2002-2025 Zuse Institute Berlin (ZIB) */
    7/* */
    8/* Licensed under the Apache License, Version 2.0 (the "License"); */
    9/* you may not use this file except in compliance with the License. */
    10/* You may obtain a copy of the License at */
    11/* */
    12/* http://www.apache.org/licenses/LICENSE-2.0 */
    13/* */
    14/* Unless required by applicable law or agreed to in writing, software */
    15/* distributed under the License is distributed on an "AS IS" BASIS, */
    16/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. */
    17/* See the License for the specific language governing permissions and */
    18/* limitations under the License. */
    19/* */
    20/* You should have received a copy of the Apache-2.0 license */
    21/* along with SCIP; see the file LICENSE. If not visit scipopt.org. */
    22/* */
    23/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
    24
    25/**@file type_rational.h
    26 * @brief type definitions for rational numbers
    27 * @author Leon Eifler
    28 */
    29
    30/*---+----1----+----2----+----3----+----4----+----5----+----6----+----7----+----8----+----9----+----0----+----1----+----2*/
    31
    32#ifndef __SCIP_TYPE_RATIONAL_H__
    33#define __SCIP_TYPE_RATIONAL_H__
    34
    35#ifdef __cplusplus
    36extern "C" {
    37#endif
    38
    39/** type used for rational numbers */
    41
    42/** dynamic array for storing SCIP_Real values */
    44
    45/** information if a rational is exactly representable as a floating point number */
    47{
    48 SCIP_ISFPREPRESENTABLE_UNKNOWN = 0, /**< representability is unknown */
    49 SCIP_ISFPREPRESENTABLE_TRUE = 1, /**< is representable */
    50 SCIP_ISFPREPRESENTABLE_FALSE = 2 /**< is not representable */
    51};
    53
    54/** defines the possible rounding direction for a rational number, when converting to a double */
    56{
    57 SCIP_R_ROUND_DOWNWARDS = 0, /**< always round to nearest smaller double */
    58 SCIP_R_ROUND_UPWARDS = 1, /**< always round to nearest larger double */
    59 SCIP_R_ROUND_NEAREST = 2 /**< always round to nearest double */
    60};
    62
    63#ifdef __cplusplus
    64}
    65#endif
    66
    67#endif
    enum SCIP_IsFpRepresentable SCIP_ISFPREPRESENTABLE
    Definition: type_rational.h:52
    enum SCIP_RoundModeRational SCIP_ROUNDMODE_RAT
    Definition: type_rational.h:61
    SCIP_IsFpRepresentable
    Definition: type_rational.h:47
    @ SCIP_ISFPREPRESENTABLE_FALSE
    Definition: type_rational.h:50
    @ SCIP_ISFPREPRESENTABLE_TRUE
    Definition: type_rational.h:49
    @ SCIP_ISFPREPRESENTABLE_UNKNOWN
    Definition: type_rational.h:48
    SCIP_RoundModeRational
    Definition: type_rational.h:56
    @ SCIP_R_ROUND_UPWARDS
    Definition: type_rational.h:58
    @ SCIP_R_ROUND_DOWNWARDS
    Definition: type_rational.h:57
    @ SCIP_R_ROUND_NEAREST
    Definition: type_rational.h:59