lemon/color.cc
author Peter Kovacs <kpeter@inf.elte.hu>
Thu, 06 Aug 2009 20:28:28 +0200
changeset 761 5795860737f5
parent 209 765619b7cbb2
permissions -rw-r--r--
Traits class + named parameters for MinMeanCycle (#179)

- Add a Traits class defining LargeValue, Tolerance, Path types.
LargeValue is used for internal computations, it is 'long long'
if the length type is integer, otherwise it is 'double'.
- Add named template parameters for LargeValue and Path types.
- Improve numerical stability: remove divisions from the internal
computations. If the arc lengths are integers, then all used
values are integers (except for the cycleMean() query function,
of course).
alpar@209
     1
/* -*- mode: C++; indent-tabs-mode: nil; -*-
alpar@128
     2
 *
alpar@209
     3
 * This file is a part of LEMON, a generic C++ optimization library.
alpar@128
     4
 *
alpar@440
     5
 * Copyright (C) 2003-2009
alpar@128
     6
 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
alpar@128
     7
 * (Egervary Research Group on Combinatorial Optimization, EGRES).
alpar@128
     8
 *
alpar@128
     9
 * Permission to use, modify and distribute this software is granted
alpar@128
    10
 * provided that this copyright notice appears in all copies. For
alpar@128
    11
 * precise terms see the accompanying LICENSE file.
alpar@128
    12
 *
alpar@128
    13
 * This software is provided "AS IS" with no warranty of any kind,
alpar@128
    14
 * express or implied, and with no claim as to its suitability for any
alpar@128
    15
 * purpose.
alpar@128
    16
 *
alpar@128
    17
 */
alpar@128
    18
alpar@128
    19
///\file
alpar@128
    20
///\brief Color constants
alpar@128
    21
alpar@128
    22
#include<lemon/color.h>
alpar@128
    23
alpar@128
    24
namespace lemon {
alpar@128
    25
alpar@128
    26
  const Color WHITE(1,1,1);
alpar@209
    27
alpar@128
    28
  const Color BLACK(0,0,0);
alpar@128
    29
  const Color RED(1,0,0);
alpar@128
    30
  const Color GREEN(0,1,0);
alpar@128
    31
  const Color BLUE(0,0,1);
alpar@128
    32
  const Color YELLOW(1,1,0);
alpar@128
    33
  const Color MAGENTA(1,0,1);
alpar@128
    34
  const Color CYAN(0,1,1);
alpar@128
    35
alpar@128
    36
  const Color GREY(0,0,0);
alpar@128
    37
  const Color DARK_RED(.5,0,0);
alpar@128
    38
  const Color DARK_GREEN(0,.5,0);
alpar@128
    39
  const Color DARK_BLUE(0,0,.5);
alpar@128
    40
  const Color DARK_YELLOW(.5,.5,0);
alpar@128
    41
  const Color DARK_MAGENTA(.5,0,.5);
alpar@128
    42
  const Color DARK_CYAN(0,.5,.5);
alpar@209
    43
alpar@128
    44
} //namespace lemon