<commit_before>﻿namespace R3.Geometry
{
	using R3.Math;
	using System;
	using System.Numerics;

	public enum HyperbolicModel
	{
		Poincare,
		Klein,
		Pseudosphere,
		Hyperboloid,
		Band,
		UpperHalfPlane,
		Orthographic,
		Square,
		InvertedPoincare,
		Joukowsky,
		Ring,
		Azimuthal_Equidistant,
		Azimuthal_EqualArea,
	}

	public class HyperbolicModels
	{
		public static Vector3D PoincareToKlein( Vector3D p )
		{
			double mag = 2 / (1 + p.Dot( p ));
			return p * mag;
		}

		public static double KleinToPoincare( double magSquared )
		{
			double dot = magSquared;
			if (dot > 1)    // This avoids some NaN problems I saw.
				dot = 1;
			return (1 - Math.Sqrt( 1 - dot )) / dot;
		}

		public static Vector3D KleinToPoincare( Vector3D k )
		{
			double dot = k.Dot( k );
			return k * KleinToPoincare( dot );
		}

		public static Mobius Upper
		{
			get<commit_msg>Add Schwarz_Christoffel model type<commit_after>﻿namespace R3.Geometry
{
	using R3.Math;
	using System;
	using System.Numerics;

	public enum HyperbolicModel
	{
		Poincare,
		Klein,
		Pseudosphere,
		Hyperboloid,
		Band,
		UpperHalfPlane,
		Orthographic,
		Square,
		InvertedPoincare,
		Joukowsky,
		Ring,
		Azimuthal_Equidistant,
		Azimuthal_EqualArea,
		Schwarz_Christoffel
	}

	public class HyperbolicModels
	{
		public static Vector3D PoincareToKlein( Vector3D p )
		{
			double mag = 2 / (1 + p.Dot( p ));
			return p * mag;
		}

		public static double KleinToPoincare( double magSquared )
		{
			double dot = magSquared;
			if (dot > 1)    // This avoids some NaN problems I saw.
				dot = 1;
			return (1 - Math.Sqrt( 1 - dot )) / dot;
		}

		public static Vector3D KleinToPoincare( Vector3D k )
		{
			double dot = k.Dot( k );
			return k * KleinToPoincare( dot );
		}

		public static Mobius Upper
		{
			get
{'fraction_non_alphanumeric': 0.08821887213847013, 'fraction_numerical': 0.01340033500837521, 'mean_word_length': 2.9558498896247243, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '1074556', 'n_tokens_mistral': 812, 'n_tokens_neox': 667, 'n_words': 179}