Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

Index

Constructors

constructor

  • new de(): de

Properties

adjBeforeNoun

adjBeforeNoun: boolean = true

code

code: string = "de"

endings

endings: never[] = []

genderedLanguage

genderedLanguage: boolean = true

nounCapitalization

nounCapitalization: boolean = true

Methods

addAdjective

  • addAdjective(adj: string, noun: string, options?: Options): string
  • Adds an appropriately declensed adjective to a noun.

    Parameters

    • adj: string

      The adjective, already declensed.

    • noun: string

      The noun to which the adjective is added.

    • Default value options: Options = {}

      Additional options.

    Returns string

    A string with the adjective + noun combination in the correct order.

antiprismGender

cross

  • cross(d: number, options?: Options): string

crossGender

  • crossGender(d: number): Gender

cuploidGender

cupolaGender

cupolaicBlendGender

element

  • element(d: number, options?: Options): string
  • The name for an d-element, according to Wendy Krieger's polygloss. This is an extension of the scheme Jonathan Bowers uses on his website. Works up to d = 30. Defaults to "d-element".

    Most of these are neologisms, so feel free to translate them as you think is appropriate.

    Parameters

    • d: number

      The number of dimensions of the element.

    • Default value options: Options = {}

      Result modifiers.

    Returns string

    The name of a d-element.

greekPrefix

  • greekPrefix(n: number, options?: Options): string

hypercube

  • hypercube(d: number, options?: Options): string

hypercubeGender

  • hypercubeGender(d: number): Gender

multiprismGender

  • multiprismGender(n: number): Gender

multipyramidGender

  • multipyramidGender(n: number): Gender

multitegumGender

  • multitegumGender(n: number): Gender

plain

  • plain(n: number, dimension: number, options?: Options): string

plainGender

  • plainGender(n: number, d: number): Gender

polygonGender

  • polygonGender(n: number, d: number): Gender

polytopeEnding

  • polytopeEnding(d: number, options?: Options): string

regularPolygon

  • regularPolygon(n: number, d?: undefined | number, options?: Options): string

simplex

  • simplex(d: number, options?: Options): string

simplexGender

  • simplexGender(d: number): Gender

toAdjective

  • toAdjective(name: string, gender: Gender): string
  • Converts a polytope name into an adjective, possibly depending on the grammatical gender of the substantive it modifies.

    To do this, the code compares the string with a list of Ending patterns. The longest pattern that matches is then applied to transform the string into what will hopefully be the correct adjective form. If no match is found, the string is left as-is.

    Example

    // Sets language to English.
    setLanguage("en");
    
    // "cubic"
    console.log(Language.toAdjective("cube"));

    Parameters

    • name: string

      The name of the polytope to convert into an adjective.

    • gender: Gender

      The grammatical gender to use.

    Returns string

    The polytope name as an adjective.

Generated using TypeDoc, the 1/31/2021 at 6:18:55 AM