lemon/color.cc
author Peter Kovacs <kpeter@inf.elte.hu>
Fri, 03 Apr 2009 18:59:15 +0200
changeset 600 6ac5d9ae1d3d
parent 209 765619b7cbb2
permissions -rw-r--r--
Support real types + numerical stability fix in NS (#254)

- Real types are supported by appropriate inicialization.
- A feature of the XTI spanning tree structure is removed to ensure
numerical stability (could cause problems using integer types).
The node potentials are updated always on the lower subtree,
in order to prevent overflow problems.
The former method isn't notably faster during to our tests.
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