krähemann.com

AgsSolverPolynomial

AgsSolverPolynomial — solver polynomial

Stability Level

Stable, unless otherwise indicated

Properties

gchar * coefficient Read / Write
AgsComplex * coefficient-value Read / Write
gpointer exponent Read
gpointer exponent-value Read
gchar * polynomial Read / Write
gpointer symbol Read / Write

Object Hierarchy

    GObject
    ╰── AgsSolverPolynomial

Includes

#include <ags/lib/ags_solver_polynomial.h>

Description

The AgsSolverPolynomial contains the solver polynomials.

Functions

AGS_SOLVER_POLYNOMIAL_GET_OBJ_MUTEX()

#define AGS_SOLVER_POLYNOMIAL_GET_OBJ_MUTEX(obj) (&(((AgsSolverPolynomial *) obj)->obj_mutex))

ags_solver_polynomial_error_quark ()

GQuark
ags_solver_polynomial_error_quark ();

ags_solver_polynomial_set_polynomial ()

void
ags_solver_polynomial_set_polynomial (AgsSolverPolynomial *solver_polynomial,
                                      gchar *polynomial);

Set polynomial of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

polynomial

the polynomial

 

Since: 3.9.3


ags_solver_polynomial_get_polynomial ()

gchar *
ags_solver_polynomial_get_polynomial (AgsSolverPolynomial *solver_polynomial);

Get polynomial of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Returns

the polynomial

Since: 3.9.3


ags_solver_polynomial_set_coefficient ()

void
ags_solver_polynomial_set_coefficient (AgsSolverPolynomial *solver_polynomial,
                                       gchar *coefficient);

Set coefficient of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

coefficient

the coefficient

 

Since: 3.9.3


ags_solver_polynomial_get_coefficient ()

gchar *
ags_solver_polynomial_get_coefficient (AgsSolverPolynomial *solver_polynomial);

Get coefficient of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Returns

the coefficient

Since: 3.9.3


ags_solver_polynomial_get_symbol ()

gchar **
ags_solver_polynomial_get_symbol (AgsSolverPolynomial *solver_polynomial);

Get symbol of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Returns

the symbol.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.9.3


ags_solver_polynomial_get_exponent ()

gchar **
ags_solver_polynomial_get_exponent (AgsSolverPolynomial *solver_polynomial);

Get exponent of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Returns

the exponent.

[element-type utf8][array zero-terminated=1][transfer full]

Since: 3.9.3


ags_solver_polynomial_set_coefficient_value ()

void
ags_solver_polynomial_set_coefficient_value
                               (AgsSolverPolynomial *solver_polynomial,
                                AgsComplex *coefficient_value);

Set coefficient_value of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

coefficient_value

the coefficient value

 

Since: 3.9.3


ags_solver_polynomial_get_coefficient_value ()

AgsComplex *
ags_solver_polynomial_get_coefficient_value
                               (AgsSolverPolynomial *solver_polynomial);

Get coefficient value of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Returns

the coefficient value

Since: 3.9.3


ags_solver_polynomial_get_exponent_value ()

AgsComplex *
ags_solver_polynomial_get_exponent_value
                               (AgsSolverPolynomial *solver_polynomial);

Get exponent value of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Returns

the exponent value.

[element-type gpointer][array zero-terminated=0][transfer none]

Since: 3.9.3


ags_solver_polynomial_update ()

void
ags_solver_polynomial_update (AgsSolverPolynomial *solver_polynomial);

Update string representation of solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

Since: 3.2.0


ags_solver_polynomial_parse ()

void
ags_solver_polynomial_parse (AgsSolverPolynomial *solver_polynomial,
                             gchar *polynomial);

Parse polynomial and apply to solver_polynomial .

Parameters

solver_polynomial

the AgsSolverPolynomial

 

polynomial

the polynomial as string

 

Since: 3.2.0


ags_solver_polynomial_add ()

AgsSolverPolynomial *
ags_solver_polynomial_add (AgsSolverPolynomial *polynomial_a,
                           AgsSolverPolynomial *polynomial_b,
                           GError **error);

Perform addition of polynomial_a and polynomial_b . Both summands need to have the very same symbol and exponent, otherwise NULL returned and error is appropriately set.

Parameters

polynomial_a

the first summand

 

polynomial_b

the second summand

 

error

return location of GError

 

Returns

the newly instantiated AgsSolverPolynomial or NULL.

[transfer full]

Since: 3.2.0


ags_solver_polynomial_subtract ()

AgsSolverPolynomial *
ags_solver_polynomial_subtract (AgsSolverPolynomial *polynomial_a,
                                AgsSolverPolynomial *polynomial_b,
                                GError **error);

Perform subtraction of polynomial_a and polynomial_b . Both minuend and subtrahend need to have the very same symbol and exponent, otherwise NULL returned and error is appropriately set.

Parameters

polynomial_a

the minuend

 

polynomial_b

the subtrahend

 

error

return location of GError

 

Returns

the newly instantiated AgsSolverPolynomial or NULL.

[transfer full]

Since: 3.2.0


ags_solver_polynomial_multiply ()

AgsSolverPolynomial *
ags_solver_polynomial_multiply (AgsSolverPolynomial *polynomial_a,
                                AgsSolverPolynomial *polynomial_b,
                                GError **error);

Perform multiplication of polynomial_a and polynomial_b .

Parameters

polynomial_a

the first factor

 

polynomial_b

the second factor

 

error

return location of GError

 

Returns

the newly instantiated AgsSolverPolynomial or NULL.

[transfer full]

Since: 3.2.0


ags_solver_polynomial_divide ()

AgsSolverPolynomial *
ags_solver_polynomial_divide (AgsSolverPolynomial *polynomial_a,
                              AgsSolverPolynomial *polynomial_b,
                              GError **error);

Perform division of polynomial_a and polynomial_b .

Parameters

polynomial_a

the dividend

 

polynomial_b

the divisor

 

error

return location of GError

 

Returns

the newly instantiated AgsSolverPolynomial or NULL.

[transfer full]

Since: 3.2.0


ags_solver_polynomial_raise_power ()

AgsSolverPolynomial *
ags_solver_polynomial_raise_power (AgsSolverPolynomial *polynomial_a,
                                   AgsSolverPolynomial *polynomial_b,
                                   GError **error);

Perform raising power of polynomial_a and polynomial_b .

Parameters

polynomial_a

the base

 

polynomial_b

the exponent

 

error

return location of GError

 

Returns

the newly instantiated AgsSolverPolynomial or NULL.

[transfer full]

Since: 3.2.0


ags_solver_polynomial_extract_root ()

AgsSolverPolynomial *
ags_solver_polynomial_extract_root (AgsSolverPolynomial *polynomial_a,
                                    AgsSolverPolynomial *polynomial_b,
                                    GError **error);

Perform raising power of polynomial_a and polynomial_b .

Parameters

polynomial_a

the base

 

polynomial_b

the index of root

 

error

return location of GError

 

Returns

the newly instantiated AgsSolverPolynomial or NULL.

[transfer full]

Since: 3.2.0


ags_solver_polynomial_new ()

AgsSolverPolynomial *
ags_solver_polynomial_new ();

Instantiate a new AgsSolverPolynomial.

Returns

the new instance

Since: 3.2.0

Types and Values

AGS_SOLVER_POLYNOMIAL_ERROR

#define AGS_SOLVER_POLYNOMIAL_ERROR (ags_solver_polynomial_error_quark())

enum AgsSolverPolynomialError

Members

AGS_SOLVER_POLYNOMIAL_ERROR_SYMBOL_MISMATCH

   

AGS_SOLVER_POLYNOMIAL_ERROR_EXPONENT_MISMATCH

   

AGS_SOLVER_POLYNOMIAL_ERROR_DIVISION_BY_ZERO

   

AGS_SOLVER_POLYNOMIAL_ERROR_EXPONENT_NOT_CONSTANT

   

Property Details

The “coefficient” property

  “coefficient”              gchar *

The assigned coefficient.

Owner: AgsSolverPolynomial

Flags: Read / Write

Default value: NULL

Since: 3.2.0


The “coefficient-value” property

  “coefficient-value”        AgsComplex *

Coefficient value.

Owner: AgsSolverPolynomial

Flags: Read / Write

Since: 3.2.0


The “exponent” property

  “exponent”                 gpointer

The assigned exponent.

Owner: AgsSolverPolynomial

Flags: Read

Since: 3.2.0


The “exponent-value” property

  “exponent-value”           gpointer

Exponent value.

Owner: AgsSolverPolynomial

Flags: Read

Since: 3.2.0


The “polynomial” property

  “polynomial”               gchar *

The assigned polynomial.

Owner: AgsSolverPolynomial

Flags: Read / Write

Default value: NULL

Since: 3.2.0


The “symbol” property

  “symbol”                   gpointer

The assigned symbol.

Owner: AgsSolverPolynomial

Flags: Read / Write

Since: 3.2.0