<commit_before>/*******************************************************************************
FILE : spectrum_settings.c

Largely pillaged from graphics/element_group_settings.c

LAST MODIFIED : 15 October 1998

DESCRIPTION :
Spectrum_settings structure and routines for describing and manipulating the
appearance of spectrums.
==============================================================================*/
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "general/debug.h"
#include "general/indexed_list_private.h"
#include "general/list.h"
#include "general/compare.h"
#include "general/object.h"
#include "graphics/colour.h"
#include "graphics/material.h"
#include "graphics/spectrum.h"
#include "graphics/spectrum_settings.h"
#include "user_interface/message.h"

/*
Global variables
----------------
*/
/*
Module types
------------
*/

struct Spectrum_settings
/*******************************************************************************
LAST MODIFIED : 14 July 1998

DESCRIPTION :
Stores one group of settings for a single part of a spectrum rendition.
==============================================================================*/
{
	/* unique identifier for each settings */
	int position;
	int component_number; /* Which data component this settings uses (0 is first component)*/
	int active; /* This corresponds to visiblity for graphical finite elements */
	enum Spectrum_settings_type settings_type;
	char settings_changed;

	/* These specify the range of values over which the settings operates */
	float maximum, minimum;
	/* These flags control whether a settings is transparent (has no effect)
		or is clamped at its extreme values outside it's minimum and maximum */
	int extend_above, extend_below;
	/* These specify the limits of the converted value before it is rendered to
		a colour, i.e. red varies from <min_value> red at the <minimum> to 
		<max_value> red at the <maximum> */
	float max_value, min_value;
	int reverse;
	enum Spectrum_settings_colour_mapping colour_mapping;
	enum Spectrum_settings_render_type render_type;
	float exaggeration, step_value;
	/* The number of bands in a banded contour and the proportion (out of 1000)
		of the black bands */
	int number_of_bands, black_band_proportion;

#if defined (GL_EXT_texture_object)
	/* Texture number for banded and step spectrums */
	int texture_id;
#endif /* defined (GL_EXT_texture_object) */
	 
	/* For accessing objects */
	int access_count;
};

FULL_DECLARE_INDEXED_LIST_TYPE(Spectrum_settings);

/*
Module functions
----------------
*/
DECLARE_INDEXED_LIST_MODULE_FUNCTIONS(Spectrum_settings,position,int, \<commit_msg>Fix warnings.<commit_after>/*******************************************************************************
FILE : spectrum_settings.c

Largely pillaged from graphics/element_group_settings.c

LAST MODIFIED : 15 October 1998

DESCRIPTION :
Spectrum_settings structure and routines for describing and manipulating the
appearance of spectrums.
==============================================================================*/
#include <math.h>
#include <stdlib.h>
#include <stdio.h>
#include "general/debug.h"
#include "general/indexed_list_private.h"
#include "general/list.h"
#include "general/compare.h"
#include "general/object.h"
#include "graphics/colour.h"
#include "graphics/material.h"
#include "graphics/spectrum.h"
#include "graphics/spectrum_settings.h"
#include "user_interface/message.h"

/*
Global variables
----------------
*/
/*
Module types
------------
*/

struct Spectrum_settings
/*******************************************************************************
LAST MODIFIED : 14 July 1998

DESCRIPTION :
Stores one group of settings for a single part of a spectrum rendition.
==============================================================================*/
{
	/* unique identifier for each settings */
	int position;
	int component_number; /* Which data component this settings uses (0 is first component)*/
	int active; /* This corresponds to visiblity for graphical finite elements */
	enum Spectrum_settings_type settings_type;
	char settings_changed;

	/* These specify the range of values over which the settings operates */
	float maximum, minimum;
	/* These flags control whether a settings is transparent (has no effect)
		or is clamped at its extreme values outside it's minimum and maximum */
	int extend_above, extend_below;
	/* These specify the limits of the converted value before it is rendered to
		a colour, i.e. red varies from <min_value> red at the <minimum> to 
		<max_value> red at the <maximum> */
	float max_value, min_value;
	int reverse;
	enum Spectrum_settings_colour_mapping colour_mapping;
	enum Spectrum_settings_render_type render_type;
	float exaggeration, step_value;
	/* The number of bands in a banded contour and the proportion (out of 1000)
		of the black bands */
	int number_of_bands, black_band_proportion;

#if defined (GL_EXT_texture_object)
	/* Texture number for banded and step spectrums */
	unsigned int texture_id;
#endif /* defined (GL_EXT_texture_object) */
	 
	/* For accessing objects */
	int access_count;
};

FULL_DECLARE_INDEXED_LIST_TYPE(Spectrum_settings);

/*
Module functions
----------------
*/
DECLARE_INDEXED_LIST_MODULE_FUNCTIONS(Spectrum_settings,position,int, \
{'fraction_non_alphanumeric': 0.2070467891646145, 'fraction_numerical': 0.0064406137526046596, 'mean_word_length': 5.168224299065421, 'pattern_counts': {'":': 0, '<': 17, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7570979', 'n_tokens_mistral': 1497, 'n_tokens_neox': 1357, 'n_words': 480}