Сегодня 9-го ноября β переместилась из числителя в знаменатель.
Хармс, Записная книжка, 1924.

Albert - an old C++ interface

This is relevant for Albert versions 4.0M-4.0M4

The library interface is rather limited and does not provide all Albert functionality, as my primary concern was to perform computations of dimensions of certain operads described in the paper The alternative operad is not Koszul. Note also that the library is not thread-safe. The following code snippet was used in computations of dimension of the alternative operad in degree 6 modulo different primes (supplied on the standard input) and may serve as an example of the Albert C++ library usage:

#include <stdlib.h>
#include <iostream>
#include "albert.h"

int main()
{
  Dalbert_node* dot_albert;
  if (albert_init (3000, (char*)"/home/pasha/prj/albert/.albert", &dot_albert, 0) != 1)
	{
	  std::cerr << "albert_init() failed" << std::endl;
	  exit (-1);
	}
  // left alternative
  if (albert_add_identity ("(xx)y-x(xy)") == 0)
	{
	  std::cerr << "albert_add_identity() failed" << std::endl;
	  exit (-1);
	}
  // right alternative
  if (albert_add_identity ("(xy)y-x(yy)") == 0)
	{
	  std::cerr << "albert_add_identity() failed" << std::endl;
	  exit (-1);
	}
  albert_set_generators (6);
  albert_set_sparse (0);

  long long p;
  while (! std::cin.eof())
	{
	  std::cin >> p >> std::ws;
	  if (albert_set_field (p, 1) != 1)
		{
		  std::cerr << "albert_set_field() failed" << std::endl;
		  exit (-1);
		}
	  if (albert_build (0) != 1)
		{
		  std::cerr << "albert_build() failed" << std::endl;
		}
	}

  albert_free (dot_albert);
  exit (0);
}

Alternatively, the same effect may be achieved by feeding commands to the albert binary from the standard input:
i (xx)y-x(xy)
i (xy)y-x(yy)
g abcdef
f <1st prime>
build
f <2nd prime>
build
...
f <last prime>
build
quit


Created: Tue Mar 10 2009
Last modified: Mon Aug 8 17:24:06 CEST 2022