<commit_before>//
//  LUTColor.h
//  DropLUT
//
//  Created by <NAME> on 12/15/13.
//  Copyright (c) 2013 <NAME>. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CocoaLUT.h"

/**
 *  Used to represent the value of a channel for a `LUTColor`.
 */
typedef double LUTColorValue;

/**
 *  Represents a color value on a 3D LUT lattice.
 */
@interface LUTColor : NSObject

/**
 *  The value of the red channel of the color. Values should be between 0 and 1
 */
@property (assign) LUTColorValue red;

/**
 *  The value of the green channel of the color. Values should be between 0 and 1
 */
@property (assign) LUTColorValue green;

/**
 *  The value of the blue channel of the color. Values should be between 0 and 1
 */
@property (assign) LUTColorValue blue;


/**
 *  Returns a new color with the provided floating-point channel values.
 *
 *  @param r The value of the red channel of the color. Values should be between 0 and 1
 *  @param g The value of the green channel of the color. Values should be between 0 and 1
 *  @param b The value of the blue channel of the color. Values should be between 0 and 1
 *
 *  @return A new color.
 */
+ (instancetype)colorWithRed:(LUTColorValue)r green:(LUTColorValue)g blue:(LUTColorValue)b;

/**
 *  Returns a new color with the provided integer channel values and a bit depth of the color system. Values will be converted to floating-point.
 *
 *  @param bitdepth The bit depth of the color system represented by these integers.
 *  @param r        The value of the red channel of the color in the color system.
 *  @param g        The value of the green channel of the color in the color system.
 *  @param b        The value of the blue channel of the color in the color system.
 *
 *  @return A new color.
 */
+ (instancetype)colorFromIntegersWithBitDepth:(NSUInteger)bitdepth red:(NSUInteger)r green:(NSUInteger)g blue:(NSUInteger)b;
+ (instancetype)colorFromIntegersWithMaxOutputValue:(NSUInteger)maxOutputValue red:(NSUInteger)r green:(NSUInteger)g blue:(NSUInteger)b;


- (LUTColor *)contrastStretchWithCurrentMin:(double)currentMin
                                 currentMax:(double)currentMax
                                   finalMin:(double)finalMin
                                   finalMax:(double)finalMax;

/**
 *  Returns a new color with channel values clipped below zero and above 1.
 *
 *  @return A new color.
 */
- (LUTColor *)clamped01;

- (LUTColor *)clampedWithLowerBound:(double)lowerBound
                         upperBound:(double)upperBound;

- (LUTColor *)remappedFromInputLow:(double)inputLow
                         inputHigh:(double)inputHigh
                         outputLow:(double)outputLow
                        outputHigh:(double)outputHigh;

- (LUTColor *)colorByAddingColor:(LUTColor *)offsetColor;

- (LUTColor *)colorByChangingSaturation:(double)saturation;

- (LUTColor *)colorByApplyingRedSlope:(double)redSlope
                            redOffset:(double)redOffset
                             redPower:(double)redPower
                           greenSlope:(double)greenSlope
                          greenOffset:(double)greenOffset
                           greenPower:(double)greenPower
                            blueSlope:(double)blueSlope
                           blueOffset:(double)blueOffset
                            bluePower:(double)bluePower;<commit_msg>header oops for saturation function LUTColor<commit_after>//
//  LUTColor.h
//  DropLUT
//
//  Created by <NAME> on 12/15/13.
//  Copyright (c) 2013 <NAME>. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "CocoaLUT.h"

/**
 *  Used to represent the value of a channel for a `LUTColor`.
 */
typedef double LUTColorValue;

/**
 *  Represents a color value on a 3D LUT lattice.
 */
@interface LUTColor : NSObject

/**
 *  The value of the red channel of the color. Values should be between 0 and 1
 */
@property (assign) LUTColorValue red;

/**
 *  The value of the green channel of the color. Values should be between 0 and 1
 */
@property (assign) LUTColorValue green;

/**
 *  The value of the blue channel of the color. Values should be between 0 and 1
 */
@property (assign) LUTColorValue blue;


/**
 *  Returns a new color with the provided floating-point channel values.
 *
 *  @param r The value of the red channel of the color. Values should be between 0 and 1
 *  @param g The value of the green channel of the color. Values should be between 0 and 1
 *  @param b The value of the blue channel of the color. Values should be between 0 and 1
 *
 *  @return A new color.
 */
+ (instancetype)colorWithRed:(LUTColorValue)r green:(LUTColorValue)g blue:(LUTColorValue)b;

/**
 *  Returns a new color with the provided integer channel values and a bit depth of the color system. Values will be converted to floating-point.
 *
 *  @param bitdepth The bit depth of the color system represented by these integers.
 *  @param r        The value of the red channel of the color in the color system.
 *  @param g        The value of the green channel of the color in the color system.
 *  @param b        The value of the blue channel of the color in the color system.
 *
 *  @return A new color.
 */
+ (instancetype)colorFromIntegersWithBitDepth:(NSUInteger)bitdepth red:(NSUInteger)r green:(NSUInteger)g blue:(NSUInteger)b;
+ (instancetype)colorFromIntegersWithMaxOutputValue:(NSUInteger)maxOutputValue red:(NSUInteger)r green:(NSUInteger)g blue:(NSUInteger)b;


- (LUTColor *)contrastStretchWithCurrentMin:(double)currentMin
                                 currentMax:(double)currentMax
                                   finalMin:(double)finalMin
                                   finalMax:(double)finalMax;

/**
 *  Returns a new color with channel values clipped below zero and above 1.
 *
 *  @return A new color.
 */
- (LUTColor *)clamped01;

- (LUTColor *)clampedWithLowerBound:(double)lowerBound
                         upperBound:(double)upperBound;

- (LUTColor *)remappedFromInputLow:(double)inputLow
                         inputHigh:(double)inputHigh
                         outputLow:(double)outputLow
                        outputHigh:(double)outputHigh;

- (LUTColor *)colorByAddingColor:(LUTColor *)offsetColor;

- (LUTColor *)colorByChangingSaturation:(double)saturation
                             usingLumaR:(double)lumaR
                                  lumaG:(double)lumaG
                                  lumaB:(double)lumaB;

- (LUTColor *)colorByApplyingRedSlope:(double)redSlope
                            redOffset:(double)redOffset
                             redPower:(double)redPower
                           greenSlope:(double)greenSlope
                          greenOffset:(double)greenOffset
                           greenPower:(double)greenPower
                            blueSlope:(double)blueSlope
                           blueOffset:(double)blueOffset
                            bluePower:(double)bluePower;
{'fraction_non_alphanumeric': 0.08535360780375843, 'fraction_numerical': 0.0074594749677234255, 'mean_word_length': 2.4686567164179105, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 8, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '304645', 'n_tokens_mistral': 2062, 'n_tokens_neox': 1892, 'n_words': 641}