AgsSolverPolynomial

AgsSolverPolynomial — solver polynomial

Functions

Properties

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

Types and Values

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_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

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

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

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

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

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

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


AGS_IS_SOLVER_POLYNOMIAL()

#define AGS_IS_SOLVER_POLYNOMIAL(obj)             (G_TYPE_CHECK_INSTANCE_TYPE ((obj), AGS_TYPE_SOLVER_POLYNOMIAL))

AGS_IS_SOLVER_POLYNOMIAL_CLASS()

#define AGS_IS_SOLVER_POLYNOMIAL_CLASS(class)     (G_TYPE_CHECK_CLASS_TYPE ((class), AGS_TYPE_SOLVER_POLYNOMIAL))

AGS_SOLVER_POLYNOMIAL()

#define AGS_SOLVER_POLYNOMIAL(obj)                (G_TYPE_CHECK_INSTANCE_CAST((obj), AGS_TYPE_SOLVER_POLYNOMIAL, AgsSolverPolynomial))

AGS_SOLVER_POLYNOMIAL_CLASS()

#define AGS_SOLVER_POLYNOMIAL_CLASS(class)        (G_TYPE_CHECK_CLASS_CAST((class), AGS_TYPE_SOLVER_POLYNOMIAL, AgsSolverPolynomialClass))

AGS_SOLVER_POLYNOMIAL_GET_CLASS()

#define AGS_SOLVER_POLYNOMIAL_GET_CLASS(obj)      (G_TYPE_INSTANCE_GET_CLASS (obj, AGS_TYPE_SOLVER_POLYNOMIAL, AgsSolverPolynomialClass))

ags_solver_polynomial_get_type ()

GType
ags_solver_polynomial_get_type (void);

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

   

AGS_TYPE_SOLVER_POLYNOMIAL

#define AGS_TYPE_SOLVER_POLYNOMIAL                (ags_solver_polynomial_get_type())

struct AgsSolverPolynomial

struct AgsSolverPolynomial;

struct AgsSolverPolynomialClass

struct AgsSolverPolynomialClass {
  GObjectClass gobject;
};

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”           AgsComplex *

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